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<cstdio>
using namespace std;
int data[15][15]={0};
int main(){
	
	int x,y,s;
	char c;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		
		while(1){
			data[x][y]++;
			if(y-1>=0)data[x][y-1]++;
			if(x+1<10)data[x+1][y]++;
			if(y+1<10)data[x][y+1]++;
			if(x-1>=0)data[x-1][y]++;
			if(s==1)break;
			if(x+1<10 && y+1<10)data[x+1][y+1]++;
			if(x+1<10 && y-1>=0)data[x+1][y-1]++;
			if(x-1>=0 && y-1>=0)data[x-1][y-1]++;
			if(x-1>=0 && y+1<10)data[x-1][y+1]++;
			if(s==2)break;
			if(x+2<10)data[x+2][y]++;
			if(y-2>=0)data[x][y-2]++;
			if(y+2<10)data[x][y+2]++;
			if(x-2>=0)data[x-2][y]++;
			break;
		}
		
	}
	int white=0,ma=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(data[i][j]==0)white++;
			ma=max(ma,data[i][j]);
		}
	}
	
	cout<<white<<" "<<ma<<endl;
}

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

using namespace std;

short inkmap[10][10] = { 0 };

void drawSmall(int, int);
void drawMedium(int, int);
void drawLarge(int, int);
void sch(short *, short *);

int main(void) {
	short mx = 0, buff[3], c = 0;
	
	while( scanf("%d,%d,%d", &buff[0], &buff[1], &buff[2]) != EOF ) {
		switch(buff[2]) {
		case 1:
			drawSmall(buff[0], buff[1]);		break;
		case 2:
			drawMedium(buff[0], buff[1]);		break;
		case 3:
			drawLarge(buff[0], buff[1]);		break;
		}
	}
	sch(&c, &mx);
	cout << c << endl << mx << endl;
}

void drawSmall(int x, int y) {
	const short vX[5] = { 0, -1, 0, 1, 0 };
	const short vY[5] = { -1, 0, 0, 0, 1 };
	for(int i = 0; i < 5; i++) {
		inkmap[x + vX[i]][y + vY[i]]++;
	}
}
void drawMedium(int x, int y) {
	const short vX[9] = { -1, 0, 1, -1, 0, 1, -1, 0, 1 };
	const short vY[9] = { -1, -1, -1, 0, 0, 0, 1, 1, 1 };
	for(int i = 0; i < 9; i++) {
		inkmap[x + vX[i]][y + vY[i]]++;
	}
}
void drawLarge(int x, int y) {
	const short vX[13] = { 0, -1, 0, 1, -2, -1, 0, 1, 2, -1, 0, 1, 0 };
	const short vY[13] = { -2, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 2 };
	for(int i = 0; i < 13; i++) {
		inkmap[x + vX[i]][y + vY[i]]++;
	}
}
void sch(short *c, short *m) {
	for(int i = 0; i < 10; i++) {
		for(int j = 0; j < 10; j++) {
			if(inkmap[i][j] == 0) {
				(*c)++;
			}
			else {
				*m = max(*m, inkmap[i][j]);
			}
		}
	}
}

C++: #include <iostream>
using namespace std;
int small[3][3] = {{0,1,0},{1,1,1},{0,1,0}};
int medium[3][3] ={{1,1,1},{1,1,1},{1,1,1}};
int big [5][5] = {{0,0,1,0,0},{0,1,1,1,0},{1,1,1,1,1},{0,1,1,1,0},{0,0,1,0,0}};

int main(){
    int paper[10][10] = {0};
    int x, y, size;
    int pivot_x, pivot_y;
    while(~scanf("%d,%d,%d", &x, &y, &size)){
        if(size == 1 || size == 2){
            pivot_x = x-1;
            pivot_y = y-1;
            for(int i=0; i<3; i++){
                for(int j=0; j<3; j++){
                    if((pivot_x+j >= 0)&&(pivot_x+j <= 9)&&(pivot_y+i >= 0)&&(pivot_y+i <= 9)){
                        if(size == 1){
                            paper[pivot_y+i][pivot_x+j] += small[j][i];
                        }else{
                            paper[pivot_y+i][pivot_x+j] += medium[j][i];
                        }
                    }
                }
            }
        }else{
            pivot_x = x-2;
            pivot_y = y-2;
            for(int i=0; i<5; i++){
                for(int j=0; j<5; j++){
                    if((pivot_x+j >= 0)&&(pivot_x+j <= 9)&&(pivot_y+i >= 0)&&(pivot_y+i <= 9)){
                        paper[pivot_y+i][pivot_x+j] += big[j][i];
                    }
                }
            }

        }
    }
    int max = 0;
    int cnt = 0;
    for(int i=0; i<10; i++){
        for(int j=0; j<10; j++){
            if(max < paper[i][j]){
                max = paper[i][j];
            }
            if(paper[i][j] == 0){
                cnt++;
            }
        }
    }

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

C++: #include <bits/stdc++.h>
using namespace std;

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();}

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

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

#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())

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

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

#define CLR(a) memset((a), 0 ,sizeof(a))

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

int field[15][15];
int dx[12] = {-1, 0, 1, 0, -1, -1, 1, 1, -2, 0, 2, 0};
int dy[12] = {0, -1, 0, 1, -1, 1, -1, 1, 0, -2, 0, 2};

void wfs(int y, int x, int size) {
  int n;
  if(size == 1) n = 4;
  else if(size == 2) n = 8;
  else n = 12;

  field[y][x]++;
  REP(i, n) {
    int nx = x+dx[i], ny = y+dy[i];
    if(nx < 0 || 9 < nx || ny < 0 || 9 < ny) continue;
    field[ny][nx]++;
  }
}

int main() {
  int x, y, size;
  char c1, c2;
  
 memset(field, 0, sizeof(field));
  while(cin >> x >> c1 >> y >> c2 >> size) {
    wfs(x, y, size);
  }  
    
  int max = 0;
  int cnt = 0;
  REP(i, 10) {
    REP(j, 10) {
      if(field[i][j] > max) max = field[i][j];
      if(field[i][j] == 0) cnt++;
    } 
  }  
  cout << cnt << endl;
  cout << max << endl;
}