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 <bits/stdc++.h>
using namespace std;

#define iota(i,n,b,s) for(int i=int(b);i!=int((b)+(s)*(n));i+=(s))
#define range(i,n,m) iota(i,(((n)>(m))?((n)-(m)):((m)-(n))),(n),((n)>(m)?-1:1))
#define rep(i,n) iota(i,(n),0,1)
#define loop for(;;)

#define INF (1e9)
#define EPS (1e-9)
#define cons(a,b) (make_pair(a,b))
#define car(a) (a.first)
#define cdr(a) (a.second)
#define cadr(a) (car(cdr(a)))
#define cddr(a) (cdr(cdr(a)))
#define all(a) a.begin(), a.end()
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;

typedef long long Integer;
typedef double Real;
typedef vector<int> vi;
typedef vector<string> vs;
typedef map<string,int> Dictionary;
const Real PI = acos(-1);

template<class S, class T>
ostream& operator<<(ostream& os, pair<S,T> p) {
  os << '(' << car(p) << ", " << cdr(p) << ')';
  return os;
}

template<class T>
ostream& operator<<(ostream& os, vector<T> v) {
  if (v.size() == 0) {
    os << "(empty)";
    return os;
  }
  os << v[0];
  for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i];
  return os;
}

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

int d(int x0, int y0,
      int x, int y) {
  int dx = abs(x - x0);
  int dy = abs(y - y0);
  if (dx + dy == 0) return 0;
  if (dx + dy == 1) return 1;
  if (max(dx, dy) == 1) return 2;
  if (dx + dy == 2) return 3;
  else return 100;
}

int main() {

  const int N = 10 + 2 + 2;
  int f[N][N];
  rep (i, N) rep (j, N) f[i][j] = 0;

  char comma;
  loop {
    int x, y, s;
    cin >> x >> comma >> y >> comma >> s;
    if (!cin) break;

    for (int xx = x - 2; xx < x + 3; ++xx) {
      for (int yy = y -  2; yy < y + 3; ++yy) {
        if (d(x,y,xx,yy) <= s) f[xx+2][yy+2]++;
      }
    }
  }

  int cx = 0,
      ac = -INF;
  for (int x = 2; x < N - 2; ++x) {
    for (int y = 2; y < N - 2; ++y) {
      if (!f[x][y]) ++cx;
      ac = max(ac, f[x][y]);
    }
  }

  cout << cx << endl;
  cout << ac << endl;


  return 0;
}

C++: #include <stdio.h>
#include <string.h>
#include <math.h>

int main()
{
	int x,y,size;
	unsigned char arr[ 14 * 14 ];
	memset( arr, 0, 14 * 14 );
	while ( scanf("%d,%d,%d", &x, &y, &size ) != EOF ) {
		x+=2; y+=2;
		arr[ 14 * ( x - 1 ) + y ]++;
		arr[ 14 * x + y ]++;
		arr[ 14 * ( x + 1 ) + y ]++;
		arr[ 14 * x  + y - 1 ]++;
		arr[ 14 * x  + y + 1 ]++;
		if( size >= 2 ) {
			arr[ 14 * ( x - 1 ) + y - 1 ]++;
			arr[ 14 * ( x - 1 ) + y + 1 ]++;
			arr[ 14 * ( x + 1 ) + y - 1 ]++;
			arr[ 14 * ( x + 1 ) + y + 1 ]++;
		}
		if( size >= 3 ) {
			arr[ 14 * ( x - 2 ) + y  ]++;
			arr[ 14 * ( x + 2 ) + y  ]++;
			arr[ 14 * x + y - 2  ]++;
			arr[ 14 * x + y + 2  ]++;
		}
	}

	int cnt = 0;
	int maxv = 0;

	for( int i = 2; i < 12; i++ ) {
		for( int j = 2; j < 12; j++ ) {
			if( arr[ 14 * j + i ] == 0 ) {
				cnt++;
			}
			else if( maxv < arr[ 14 * j + i ] ) {
				maxv = arr[ 14 * j + i ] ;
			}
		}
	}

	printf("%d\n%d\n", cnt, maxv);
	
	return 0;
}

C++: #include <iostream>
#include <algorithm>
int main()
{		int x, y, n;
		char a, b;
	int a = 0;
	int s = 100;
	int xy[10][10] = {};
	while (std::cin >>x>> a >> y >> b >> n) {
		switch (n)
		{
		case 1: {
			if (x != 0) {
				++xy[x - 1][y];
			}
			++xy[x + 1][y];
			if (y != 0) {
				++xy[x][y - 1];
			}
			++xy[x][y + 1];
			break;
		}
		case 2: {
			if (x != 0) {
				++xy[x - 1][y];
				++xy[x - 1][y - 1];
				++xy[x - 1][y + 1];
			}
			if (y != 0) {
				++xy[x][y - 1];
				++xy[x + 1][y - 1];
			}
			++xy[x + 1][y];
			++xy[x][y + 1];
			++xy[x + 1][y + 1];
			break;
		}
		case 3: {
			if (x != 0) {
				++xy[x - 1][y];
				++xy[x - 1][y - 1];
				++xy[x - 1][y + 1];
			}
			if (y != 0) {
				++xy[x][y - 1];
				++xy[x + 1][y - 1];
			}
			++xy[x + 1][y];
			++xy[x][y + 1];
			++xy[x + 1][y + 1];
			if (x != 2) { ++xy[x - 2][y]; }
			++xy[x + 2][y];
			if (y != 2) {
				++xy[x][y - 2];
			}
			++xy[x][y + 2];
			break;
		}
		}
	}

	for (int i = 0; i < 10; ++i) {
		for (int j = 0; j < 10; ++j) {
			if (xy[i][j] > 0) {
				--s;
			}
		}
	}
	a = xy[0][0];
	for (int i = 0; i < 10; ++i) {
		for (int j = 0; j < 10; ++j) {
			if (a < xy[i][j]) {
				a = xy[i][j];
			}
		}
	}
	std::cout << s-1 << std::endl;
	std::cout << a << std::endl;
	return 0;
}

C++: #include<iostream>
using namespace std;
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
int main(){
	int map[11][11]={0};
	char c;
	int a,b,s;
	while(cin>>a>>c>>b>>c>>s){
		switch(s){
			case 3:
				map[a][b+2]++;
				map[a][b-2]++;
				map[a+2][b]++;
				map[a-2][b]++;
			case 2:
				map[a+1][b+1]++;
				map[a+1][b-1]++;
				map[a-1][b+1]++;
				map[a-1][b-1]++;
			case 1:
				map[a][b]++;
				map[a][b+1]++;
				map[a][b-1]++;
				map[a+1][b]++;
				map[a-1][b]++;
		}
	}
	
	int max=0;
	int count=0;
	rep(i,10){
		rep(j,10){
			if(max<map[i][j])max=map[i][j];
			if(0==map[i][j])count++;
		}
	}
	cout<<count<<endl;
	cout<<max<<endl;
	
}

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

int main() {
	int paper[14][14] = {0};
	int x,y,size;
	
	while ( scanf("%d,%d,%d",&x,&y,&size) != EOF ) {
		for ( int i = -2; i <= 2; i++ ) {
			for ( int j = -2; j <= 2; j++ ) {
				if ( i*i + j*j > 4 &&(  y != 0 ||  x != 0)){
					continue;
				}
				if ( size < 3 ) {
					if ( size < 2 && i*i + j*j > 1 ){
						continue;
					}
					if ( i * i > 1 || j * j > 1 ){
						continue;
					}
				}
				paper[x+2+i][y+2+j]++;
			}
		}
	}
	
	int zero=0,max=0;
	for ( int i = 2; i < 12; i++ ) {
		for ( int j = 2; j < 12; j++ ) {
			if ( paper[i][j] == 0 )	zero++;
			if ( max < paper[i][j] )	max = paper[i][j];
		}
	}
	cout << zero << endl << max << endl;
	
	return 0;
}