Go: package main

import (
        "fmt"
)

var paper [10][10]int

func main() {
        var x, y, s int
        for {
                _, err := fmt.Scanf("%d,%d,%d", &x, &y, &s)
                if err != nil {
                        break
                }

                fill(x, y, s)
        }
        var d, z int
        for i := 0; i < 10; i++ {
                for j := 0; j < 10; j++ {
                        if paper[i][j] == 0 {
                                z += 1
                        }
                        if paper[i][j] > d {
                                d += 1
                        }
                }
        }
        fmt.Printf("%d\n%d\n", z, d)
}

func fill(x int, y int, s int) {
        paper[x][y] += 1
        if x > 0 {
                paper[x-1][y] += 1
        }
        if x < 9 {
                paper[x+1][y] += 1
        }
        if y > 0 {
                paper[x][y-1] += 1
        }
        if y < 9 {
                paper[x][y+1] += 1
        }

        if s >= 2 {
                if x > 0 && y > 0 {
                        paper[x-1][y-1] += 1
                }
                if x > 0 && y < 9 {
                        paper[x-1][y+1] += 1
                }
                if x < 9 && y > 0 {
                        paper[x+1][y-1] += 1
                }
                if x < 9 && y < 9 {
                        paper[x+1][y+1] += 1
                }
        }

        if s > 2 {
                if x > 1 {
                        paper[x-2][y] += 1
                }
                if x < 8 {
                        paper[x+2][y] += 1
                }
                if y > 1 {
                        paper[x][y-2] += 1
                }
                if y < 8 {
                        paper[x][y+2] += 1
                }
        }
}

C++: #include<iostream>
#include<string>
int mem[14][14] = {}, i = 0, X[50], Y[50], S[50];
int main() {
	int x;
	char b;
	while (1) {
		int y, s;
		std::cin >>x>> b >> y >> b >> s;
		Y[i] = y, S[i] = s;
		X[i] = x;
		if (s == 0)
			break;
		i += 1;
	}
	for(int a=0;a<i;a+=1)
	if (S[a] == 1) {
		mem[X[a] + 2][Y[a] + 2] += 1;
		mem[X[a] + 1][Y[a] + 2] += 1;
		mem[X[a] + 3][Y[a] + 2] += 1;
		mem[X[a] + 2][Y[a] + 1] += 1;
		mem[X[a] + 2][Y[a] + 3] += 1;
	}
	else if (S[a] == 2) {
		mem[X[a] + 2][Y[a] + 2] += 1;
		mem[X[a] + 1][Y[a] + 2] += 1;
		mem[X[a] + 3][Y[a] + 2] += 1;
		mem[X[a] + 2][Y[a] + 1] += 1;
		mem[X[a] + 2][Y[a] + 3] += 1;
		mem[X[a] + 1][Y[a] + 1] += 1;
		mem[X[a] + 1][Y[a] + 3] += 1;
		mem[X[a] + 3][Y[a] + 1] += 1;
		mem[X[a] + 3][Y[a] + 3] += 1;
	}
	else if (S[a] == 3) {
		mem[X[a] + 2][Y[a] + 2] += 1;
		mem[X[a] + 1][Y[a] + 2] += 1;
		mem[X[a] + 3][Y[a] + 2] += 1;
		mem[X[a] + 2][Y[a] + 1] += 1;
		mem[X[a] + 2][Y[a] + 3] += 1;
		mem[X[a] + 1][Y[a] + 1] += 1;
		mem[X[a] + 1][Y[a] + 3] += 1;
		mem[X[a] + 3][Y[a] + 1] += 1;
		mem[X[a] + 3][Y[a] + 3] += 1;
		mem[X[a]][Y[a] + 2] += 1;
		mem[X[a] + 4][Y[a] + 2] += 1;
		mem[X[a] + 2][Y[a] + 4] += 1;
		mem[X[a] + 2][Y[a]] += 1;
	}
	int flag = 0, max = 0;
	for (int i = 0; i < 10; i += 1)
		for (int j = 0; j < 10; j += 1) {
			if (0 == mem[i + 2][j + 2])
				flag += 1;
			if (max < mem[i + 2][j + 2])
				max = mem[i + 2][j + 2];
		}
	std::cout << flag+1 << std::endl;
	std::cout << max << std::endl;
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <string>
#include <ctype.h>
#include <cstring>
#include <cstdio>
#include <sstream>
#include <functional>

using namespace std;

#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define INF 114514810
#define ll long long
#define scanf scanf_s

int i, j, s;
int p[15][15];

void nuri(int i, int j)
{
	if (i >= 0 && i < 10 && j >= 0 && j < 10) p[i][j]++;
}

void shou(int i, int j)
{
	nuri(i, j);
	nuri(i - 1, j);
	nuri(i, j - 1);
	nuri(i, j + 1);
	nuri(i + 1, j);
}

void chu(int i, int j)
{
	shou(i, j);
	nuri(i - 1, j - 1);
	nuri(i - 1, j + 1);
	nuri(i + 1, j - 1);
	nuri(i + 1, j + 1);
}

void dai(int i, int j)
{
	chu(i, j);
	nuri(i - 2, j);
	nuri(i, j - 2);
	nuri(i, j + 2);
	nuri(i + 2, j);
}

int main()
{
	REP(i, 15)REP(j, 15) p[i][j] = 0;
	while (scanf("%d,%d,%d", &i, &j, &s))
	{
		if (s == 1) shou(i, j);
		if (s == 2) chu(i, j);
		if (s == 3) dai(i, j);
	}
	int cnt = 0; int mx = 0;
	REP(i, 10)REP(j, 10)
	{
		if (p[i][j] == 0) cnt++;
		mx = max(p[i][j], mx);
	}
	cout << cnt << endl << mx << endl;
	return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int a[10][10];

int main() {
    int x, y, t;
    while (scanf("%d,%d,%d", &x, &y, &t) != EOF) {
        if (t == 2) {
            rep (i, 10) rep (j, 10) if (abs(x-i)<2 && abs(y-j)<2) a[i][j]++;
        }
        else {
            const int d = t == 1 ? 1 : 2;
            rep (i, 10) rep (j, 10) if (abs(x-i)+abs(y-j) <= d) a[i][j]++;
        }
    }
    int c = 0, m = 0;
    rep (i, 10) rep (j, 10) {
        if (a[i][j] == 0) c++;
        if (a[i][j] > m) m = a[i][j];
    }
    printf("%d\n", c);
    printf("%d\n", m);
    return 0;
}

C++: #include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
using namespace std;

int masu[10][10];
void small(int x, int y) {
    for (int i = x-1; i <= x+1; i++) {
        if (0 <= i && i < 10) {
            masu[y][i]++;
        }
    }
    for (int i = y-1; i <= y+1; i++) {
        if (0 <= i && i < 10) {
            masu[i][x]++;
        }
    }
    masu[y][x]--;
}

void middle(int x, int y) {
    for (int i = y-1; i <= y+1; i++) {
        for (int j = x-1; j <= x+1; j++) {
            if (0 <= i && i < 10 && 0 <= j && j < 10) {
                masu[i][j]++;
            }
        }
    }
}

void big(int x, int y) {
    middle(x, y);
    if (0 <= x-2 && x-2 < 10) masu[y][x-2]++;
    if (0 <= x+2 && x+2 < 10) masu[y][x+2]++;
    if (0 <= y-2 && y-2 < 10) masu[y-2][x]++;
    if (0 <= y+2 && y+2 < 10) masu[y+2][x]++;
}

int main(void) {
    string s;

    while (cin >> s) {
        replace(s.begin(), s.end(), ',', ' ');
        stringstream ss(s);
        int x, y, size;
        ss >> x >> y >> size;

        switch (size) {
        case 1:
            small(x, y);
            break;
        case 2:
            middle(x, y);
            break;
        case 3:
            big(x, y);
        }
    }

    int max_num = -1;
    int no_color = 0;
    for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) {
            if (masu[i][j] == 0) {
                no_color++;
            } else {
                max_num = max(max_num, masu[i][j]);
            }
        }
    }

    cout << no_color << endl;
    cout << max_num << endl;

    return 0;
}

C++: #include <iostream>
#include <cstring>

using namespace std;

int small_x[4] = {-1,  0, 0, 1};
int small_y[4] = { 0, -1, 1, 0};

int medium_x[8] = {-1, -1, -1,  0, 0,  1, 1, 1};
int medium_y[8] = {-1,  0,  1, -1, 1, -1, 0, 1};

int large_x[12] = {-2, -1, -1, -1,  0,  0, 0, 0,  1, 1, 1, 2};
int large_y[12] = { 0, -1,  0,  1, -2, -1, 1, 2, -1, 0, 1, 0};

void solve()
{
	int Field[14][14];
	memset(Field, 0, sizeof(Field));
	int a, b, c;
	while(~scanf("%d,%d,%d", &a, &b, &c))
	{
		++Field[b + 2][a + 2];
		if(c == 1)
		{
			for(int i = 0; i < 4; ++i)
			{
				++Field[b + 2 + small_y[i]][a + 2 + small_x[i]];
			}
		}
		else if(c == 2)
		{
			for(int i = 0; i < 8; ++i)
			{
				++Field[b + 2 + medium_y[i]][a + 2 + medium_x[i]];
			}
		}
		else if(c == 3)
		{
			for(int i = 0; i < 12; ++i)
			{
				++Field[b + 2 + large_y[i]][a + 2 + large_x[i]];
			}
		}
	}
	int count = 0;
	int Max = 0;
	for(int i = 2; i < 12; ++i)
	{
		for(int j = 2; j < 12; ++j)
		{
			if(Field[i][j] == 0)
			{
				++count;
			}
			if(Max < Field[i][j])
			{
				Max = Field[i][j];
			}
		}
	}
	cout << count << endl;
	cout << Max << endl;
}

int main()
{
	solve();
	return(0);
}