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 <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;

const int margin = 3;
const int paper_size = 10;
int cordx[] = {0,  0, -1, 0, 1, -1, -1, 1,  1,  0, -2, 0, 2};
int cordy[] = {0, -1,  0, 1, 0, -1,  1, 1, -1, -2,  0, 2, 0};

int main(int argc, char **argv)
{
  vvi paper(paper_size+margin*2, vi(paper_size+margin*2, 0));
  int x, y, size;
  char com;
  for (;;) {
    cin >> x >> com >> y >> com >> size;
    if (cin.eof())
      break;

    for (int i = 0; i < 1+4*size; i++) {
      paper[margin+x+cordx[i]][margin+y+cordy[i]]++;
    }
  }

  int empty_nr = 0;
  int max_score = 0;
  for (int i = margin; i < margin+paper_size; i++) {
    for (int j = margin; j < margin+paper_size; j++) {
      if (paper[i][j]) {
        max_score = max(max_score, paper[i][j]);
      } else {
        empty_nr++;
      }
    }
  }
  cout << empty_nr << endl;
  cout << max_score << endl;

  return 0;
}

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <queue>
#include <iterator>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int gcd(int a, int b){
   int tmp;
   while(a%b==0){
      tmp=a%b;
      a=b;
      b=tmp;
   }
}

int lcm(int a,int b){
   return a*b/gcd(a,b);
}

bool prime_number(int n){
   vector<bool> i;
   if(n < 2){
      return false;
   }
   else if(n == 2){
      return true;
   }
   if(n % 2 == 0){
      return false;
   }
   for(int i=3;i<=n/i;i+=2){
      if(n % i == 0) return false;
      return true;
   }
}

int main(){
   int m[10][10]={0},x,y,size,n=0,d=0;
   char r;
   
   while(cin >> x >> r >> y >> r >> size){
      if(size==1){
         if(x>=1) m[x-1][y]++;
         m[x][y]++;
         if(x<8) m[x+1][y]++;
         if(y<8) m[x][y+1]++;
         if(y>=1) m[x][y-1]++;
      }
      else if(size==2){
         REP(i,3)REP(j,3){
            if(x+i>=1&&x+i<10&&y+i>=1&&y+i<10)
               m[x-1+i][y-1+j]++;
         }
      }else{
         REP(i,3)REP(j,3){
            if(x+i>=1&&x+i<10&&y+i>=1&&y+i<10)
               m[x-1+i][y-1+j]++;
         }
         if(x>=2) m[x-2][y]++;
         if(x<7) m[x+2][y]++;
         if(y<7) m[x][y+2]++;
         if(y>=2) m[x][y-2]++;
      }
   }
   REP(i,10)REP(j,10){
      if(m[i][j]==0)n++;
      if(d<m[i][j]) d=m[i][j];
   }
   cout << n << endl << d << endl;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;

int d[100][100];
int dx[] = { 1, 0, -1, 0 };
int dy[] = { 0, 1, 0, -1 };
int x, y, size;

int main(){
	while (scanf("%d,%d,%d", &x, &y, &size)!=EOF){
		if (size == 1){
			d[x][y]++;
			for (int i = 0; i < 4; i++){
				int nx = x + dx[i];
				int ny = y + dy[i];
				if (nx >= 0 && ny >= 0 && nx < 10 && ny < 10){
					d[x + dx[i]][y + dy[i]]++;
				}
			}
		}
		if (size == 2){
			for (int i = -1; i <= 1; i++){
				for (int j = -1; j <= 1; j++){
					if (x + i >= 0 && x + i < 10 && y + j >= 0 && y + j < 10){
						d[x + i][y + j]++;
					}
				}
			}
		}
		if (size == 3){
			for (int i = -2; i <= 2; i++){
				for (int j = -2; j <= 2; j++){
					if (abs(i) + abs(j) <= 2){
						if (x + i >= 0 && x + i < 10 && y + j>0 && y + j < 10){
							d[x + i][y + j]++;
						}
					}
				}
			}
		}
	}
	int ans = 0 , MAX = 0;
	REP(i, 10){
		REP(j, 10){
			if (d[i][j] == 0)ans++;
			MAX = max(MAX, d[i][j]);
		}
	}
	cout << ans << endl;
	cout << MAX << endl;
}