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<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<complex>
#include<stack>
#include<cmath>

using namespace std;

#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)


#define X real()
#define Y imag()
typedef complex<double> P;

int main(){
	const int N = 10;
	int masu[N][N]={0};
	int a,b,c;
	while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
		string hit[4][5]={
			{"","","","",""},
			{
				"00000",
				"00100",
				"01110",
				"00100",
				"00000",
			},
			{
				"00000",
				"01110",
				"01110",
				"01110",
				"00000",
			},
			{
				"00100",
				"01110",
				"11111",
				"01110",
				"00100",
			},
		};
		
		a-=2;
		b-=2;
		
		rep(i,5){
			rep(j,5){
				int x = a+i;
				int y = b+j;
				if(x<0 || y<0 || x>=N || y>=N)continue;
				masu[y][x] += hit[c][i][j]-'0';
			}
		}
		
	}
	int z = 0;
	int p = 0;
	
	rep(i,N)rep(j,N){
		if(masu[i][j]==0)z++;
		p=max(p,masu[i][j]);
	}
	
	printf("%d %d\n",z,p);
	
}

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

using namespace std;

#define XAXIS 10
#define YAXIS 10

int main(){
	int paper[XAXIS][YAXIS];
	int x,y,s;
	int white = 0, max=0;

	//initialize
	for(int i=0; i<XAXIS; i++)
	for(int j=0; j<YAXIS; j++)
		paper[i][j] = 0;

	while(scanf("%d,%d,%d", &x, &y, &s) != EOF){
		paper[x][y] += 1;
		switch(s){
			case 3:
				if(x+2 <  XAXIS) paper[x+2][y] += 1; //2 right 
				if(y+2 <  YAXIS) paper[x][y+2] += 1; //2 down
				if(x-2 >= 0)     paper[x-2][y] += 1; //2 left
				if(y-2 >= 0)     paper[x][y-2] += 1; //2 up

			case 2:
				if(x+1 <  XAXIS && y+1 < YAXIS )  paper[x+1][y+1] += 1; //right upper
				if(x+1 <  XAXIS && y-1 > 0)       paper[x+1][y-1] += 1; //right downer
				if(x-1 >= 0     && y+1 < YAXIS )  paper[x-1][y+1] += 1; //left upper
				if(x-1 >= 0     && y-1 < 0)       paper[x-1][y-1] += 1; //left downer

			case 1:
				if(x+1 <  XAXIS) paper[x+1][y] += 1; //right
				if(y+1 <  YAXIS) paper[x][y+1] += 1; //down
				if(x-1 >= 0)     paper[x-1][y] += 1; //left
				if(y-1 >= 0)     paper[x][y-1] += 1; //up
			default:
				break;
		}
	}

	for(int i=0; i<XAXIS; i++){
		for(int j=0; j<YAXIS; j++){
			if(paper[i][j] == 0 )  white++;
			if(max < paper[i][j] ) max = paper[i][j];
		}
	}

	cout<<white<<endl;
	cout<<max<<endl;
	return 0;
}

C++: #include<cstdio>
#include<cmath>
#include<iostream>
#include<algorithm>
#define PI 3.1415926535897932384626433
using namespace std;
int main(){
    int fie[10][10]={0};
    int x,y,s;
    while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
        for(int i=-2;i<=2;i++){
            for(int j=-2;j<=2;j++){
                if(0<=x+j&&x+j<=9&&0<=y+i&&y+i<=9){
                    if((s==1&&abs(i)+abs(j)<=1)||(s==2&&abs(i)<=1&&abs(j)<=1)||(s==3&&abs(i)+abs(j)<=2))fie[y+i][x+j]++;
                }
            }
        }
    }
    int ans0=0,ans1=1;
    for(int i=0;i<10;i++){
        for(int j=0;j<10;j++){
            if(!fie[i][j])ans0++;
            ans1=max(ans1,fie[i][j]);
        }
    }
    cout<<ans0<<endl<<ans1<<endl;
    return 0;
}

C++: #include "bits/stdc++.h"

#define ALL(a) (a).begin(),(a).end()
#define SORT(c) sort((c).begin(),(c).end())
#define DESCSORT(c) sort(c.begin(), c.end(), greater<int>())

using namespace std;

using LL = long long int;
using LD = long double;

using pii = pair<int, int>;
using pll = pair<LL, LL>;
using pdd = pair<double, double>;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vl = vector<LL>;
using vvl = vector<vl>;
using vvvl = vector<vvl>;
using vd = vector<double>;
using vvd = vector<vd>;
using vs = vector<string>;
using vb = vector<bool>;
using vvb = vector<vb>;

const int INF = (1 << 30) - 1;
const LL INF64 = ((LL)1 << 62) - 1;
const double PI = 3.1415926535897932384626433832795;

const int dy[] = { 0, 1, 0, -1 };
const int dx[] = { 1, 0, -1, 0 };

int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
LL gcd(LL x, LL y) { return y ? gcd(y, x % y) : x; }

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	vvi m(14, vi(14));

	char ch;
	int x, y, s;
	while (cin >> x >> ch >> y >> ch >> s){
		y += 2;
		x += 2;

		m[y][x]++;
		m[y + 1][x]++;
		m[y - 1][x]++;
		m[y][x + 1]++;
		m[y][x - 1]++;

		if (s == 1) {
			continue;
		}

		m[y + 1][x + 1]++;
		m[y + 1][x - 1]++;
		m[y - 1][x + 1]++;
		m[y - 1][x - 1]++;

		if (s == 2) {
			continue;
		}

		m[y + 2][x]++;
		m[y - 2][x]++;
		m[y][x + 2]++;
		m[y][x - 2]++;
	}

	int noInkGrid = 0;
	int maxInc = 0;
	for (int i = 2; i < 12; i++) {
		for (int j = 2; j < 12; j++) {
			if (m[i][j] == 0) {
				noInkGrid++;
			}
			maxInc = max(maxInc, m[i][j]);
		}
	}

	cout << noInkGrid << endl;
	cout << maxInc << endl;
	return 0;
}