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 <cstring>
#include <algorithm>
using namespace std;

int main(){
	int x, y, p, pt;
	string str;
	int field[10][10];
	int res_M, res_zero;
	
	for(int i = 0; i < 10; i++){
		for(int j = 0; j < 10; j++){
			field[i][j] = 0;
		}
	}
	
	while(getline(cin, str)){
		x = 0; y = 0; p = 0;
		pt = 0;
		
		while(pt < str.size() && str[pt] != ','){
			x = x * 10 + (str[pt] - 48);
			pt++;
		}
		pt++;
		while(pt < str.size() && str[pt] != ','){
			y = y * 10 + (str[pt] - 48);
			pt++;
		}
		pt++;
		while(pt < str.size() && str[pt] != ','){
			p = p * 10 + (str[pt] - 48);
			pt++;
		}
		
		//1st
		field[y][x]++;
		if(y > 0) field[y - 1][x]++;
		if(x > 0) field[y][x - 1]++;
		if(y + 1 < 10) field[y + 1][x]++;
		if(x + 1 < 10) field[y][x + 1]++;
		p--;
		if(p > 0){
			//2nd
			if(x > 0 && y > 0) field[y - 1][x - 1]++;
			if(x + 1 < 10 && y > 0) field[y - 1][x + 1]++;
			if(x > 0 && y + 1 < 10) field[y + 1][x - 1]++;
			if(x + 1 < 10 && y + 1 < 10) field[y + 1][x + 1]++;
			p--;
		}
		if(p > 0){
			//3rd
			if(x - 2 >= 0) field[y][x - 2]++;
			if(x + 2 < 10) field[y][x + 2]++;
			if(y + 2 < 10) field[y + 2][x]++;
			if(y - 2 >= 0) field[y - 2][x]++;
		}
	}
	
	res_M = 0; res_zero = 0;
	for(int i = 0; i < 10; i++){
		for(int j = 0; j < 10; j++){
			if(field[i][j] == 0) res_zero++;
			else res_M = max(res_M, field[i][j]);
		}
	}
	
	printf("%d\n%d\n", res_zero, res_M);
	
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;

void small(int paper[][14], int x, int y){
    paper[x][y]++;
    paper[x-1][y]++;
    paper[x+1][y]++;
    paper[x][y-1]++;
    paper[x][y+1]++;
}

void middle(int paper[][14], int x, int y){
    small(paper, x, y);
    paper[x-1][y-1]++;
    paper[x-1][y+1]++;
    paper[x+1][y-1]++;
    paper[x+1][y+1]++;
}

void large(int paper[][14], int x, int y){
    small(paper, x, y);
    paper[x-1][y-1]++;
    paper[x-1][y+1]++;
    paper[x+1][y-1]++;
    paper[x+1][y+1]++;
    paper[x-2][y]++;
    paper[x+2][y]++;
    paper[x][y-2]++;
    paper[x][y+2]++;
}

int main(){
    int paper[14][14]={};
    int x, y, Size;
    while(scanf("%d,%d,%d", &x, &y, &Size) != EOF){
        x += 2;
        y += 2;
        switch(Size){
            case 1 : small(paper, x, y); break;
            case 2 : middle(paper, x, y); break;
            case 3 : large(paper, x, y); break;
        }
    }
    int mx=0, plain=0;
    for(int i=2; i<12; i++){
        for(int j=2; j<12; j++){
            if(paper[i][j] > mx) mx = paper[i][j];
            if(paper[i][j] == 0) plain++;
        }
    }
    cout << plain << endl << mx << endl;
    return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<deque>
#include<list>
#include<map>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<queue>
#include<vector>
using namespace std;

#define M 2+10+2

int main() {
	int A[M][M] = {};

	for (int x, y, size; scanf("%d,%d,%d", &x, &y, &size) != EOF&&x;) {
		x += 2; y += 2;
		A[x + 1][y]++;
		A[x][y + 1]++;
		A[x - 1][y]++;
		A[x][y - 1]++;
		if (size == 1)continue;
		A[x + 1][y + 1]++;
		A[x + 1][y - 1]++;
		A[x - 1][y + 1]++;
		A[x - 1][y - 1]++;
		if (size == 2)continue;
		A[x + 2][y]++;
		A[x][y + 2]++;
		A[x - 2][y]++;
		A[x][y - 2]++;
	}

	int cnt = 100, MAX = 0;

	for (int x = 0; x < 10; x++) {
		for (int y = 0; y < 10; y++) {
			if (A[x + 2][y + 2]) {
				cnt--;
				MAX = max(MAX, A[x + 2][y + 2]);
			}
		}
	}
	cout << cnt << endl;
	cout << MAX << endl;
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <bitset>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#include <complex>
#include <string.h>
#include <numeric>
using namespace std;

//#define int long long
#define reps(i,s,n) for(int (i)=(s);(i)<(n);++(i))
#define rep(i,n) reps(i,0,n)
#define rept(i,n) rep(i,(n)+1)
#define repst(i,s,n) reps(i,s,(n)+1)
#define reprt(i,n,t) for(int (i)=(n);(i)>=(t);--(i))
#define repr(i,n) reprt(i,n,0)
#define each(itr,v) for(auto &(itr):(v))
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define tmax(x,y,z) max(x,max(y,z))
#define tmin(x,y,z) min(x,min(y,z))
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
#define ln '\n'
#define bln(i,n) (((i)==(n)-1)?'\n':' ')
#define dbg(x) cout<<#x" = "<<(x)<<ln<<flush
#define dbga(x,n) {cout<<#x" : ";for(int (i)=0;i<(n);++i){cout<<((x)[i])<<(i==((n)-1)?'\n':' ')<<flush;}}
#define zero(a) memset(a,0,sizeof(a))
#define unq(a) sort(all(a)),a.erase(unique(all(a)),a.end())

//typedef complex<double> P;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<string> vst;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<vector<int> > mat;

const ll inf = (ll)1e9+10;
const ll linf = (ll)1e18+10;
const ll mod = (ll)(1e9+7);
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
const int ddx[] = {0, 1, 1, 1, 0, -1, -1, -1};
const int ddy[] = {1, 1, 0, -1, -1, -1, 0, 1};
const double eps = 1e-10;

ll mop(ll a,ll b,ll m=mod) {ll r=1;a%=m;for(;b;b>>=1){if(b&1)r=r*a%m;a=a*a%m;}return r;}
ll gcd(ll a,ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b) {return a*b/gcd(a,b);}
bool ool(int x,int y,int h,int w) {return((x<0)||(h<=x)||(y<0)||(w<=y));}
bool deq(double a,double b) {return abs(a-b)<eps;}

struct oreno_initializer {
	oreno_initializer() {
		cin.tie(0);
		ios::sync_with_stdio(0);
	}
} oreno_initializer;



int a[10][10], x, y, s;

signed main() {
	while (scanf("%d,%d,%d",&x,&y,&s)!=EOF) {
		if (s==3) {
			rep(i,10) rep(j,10) if (abs(i-x)+abs(j-y)<=2) a[i][j]++;
		}
		else {
			a[x][y]++;
			rep(d,4*s) {
				int xx = x+(s==1?dx:ddx)[d], yy = y+(s==1?dy:ddy)[d];
				if (!ool(xx,yy,10,10)) a[xx][yy]++;
			}
		}
	}
	int p = 0, q = 0;
	rep(i,10) rep(j,10) {
		if (a[i][j]) chmax(q,a[i][j]);
		else p++;
	}
	cout << p << endl << q << endl;
}