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 <cmath>
using namespace std;

int map[10][10] = {{}};

void plot(int x, int y)
{
    if (0<=x && x<10 && 0<=y && y<10)
        ++map[x][y];
}

void small(int x, int y)
{
    plot(x  , y-1);
    plot(x-1, y  );
    plot(x,   y  );
    plot(x+1, y  );
    plot(x,   y+1);
}

void medium(int x, int y)
{
    for (int i = x-1; i <= x+1; ++i)
        for (int j = y-1; j <= y+1; ++j)
            plot(i, j);
}

void big(int x, int y)
{
    medium(x, y);
    plot(x, y-2);
    plot(x-2,y);
    plot(x+2,y);
    plot(x,y+2);
}

int main(void)
{
    int x, y, z;
    char c;
    while(cin >> x >> c >> y >> c >> z) {
        switch (z) {
            case 1:
                small(x, y);
                break;
            case 2:
                medium(x, y);
                break;
            case 3:
                big(x, y);
                break;
        }
    }

    int sum = 0, max = 0;
    for (int i = 0; i < 10; ++i) {
        for(int j = 0; j < 10; ++j) {
            if (map[i][j] == 0) ++sum;
            if (map[i][j] > max) max = map[i][j];
        }
    }
    cout << sum << endl << max << endl;
    return 0;
}

C++: ////#include <stdio.h>
////#include <math.h>
////int main(){
////double v;
////while(scanf("%lf",&v) != EOF){
////double y=v*v/19.6;
////int z=y;
////if(y==z){
////if(z%5==0){
////	z=y/5+1;
////printf("%d\n",z);
////continue;
////}
////}
////int q=y/5;
////q += 2;
////printf("%d\n",q);
////}
////return 0;
//
//#include <stdio.h>
//  int main(){ 
//	  int a[5],b[5],i,j;
//	  int hit=0,blow=0;
//	  while(scanf("%d %d %d %d %d %d %d %d",&a[1],&a[2],&a[3],&a[4],&b[1],&b[2],&b[3],&b[4]) != EOF){
//		  for(i=1;i<=4;i++){
//			  if(a[i]==b[i]){
//				  hit++;
//			  }
//		  }
//		  for(i=1;i<=4;i++){
//			  for(j=1;j<= 4;j++){
//				  if(j != i){
//				  if(a[i]==b[j]){
//					  blow++;
//				  }	  
//			  }
//			  }
//		  }
//		  printf("%d %d\n",hit,blow);
//		  hit=0; blow=0;
//	  }
//	  return 0;
//  }
#include <stdio.h>
  int main(){
               int x,y,s;
int i,j,num=0;
int xy[10][10]={};
	  while(scanf("%d,%d,%d",&x,&y,&s) != EOF){		  if(s==1){
			  xy[x][y]++;
			  xy[x-1][y]++;
			  xy[x+1][y]++;
			  xy[x][y-1]++;
			  xy[x][y+1]++;
		  }else if(s==2){
			  xy[x-1][y-1]++;
			  xy[x-1][y]++;
			  xy[x-1][y+1]++;
			  xy[x][y-1]++;
			  xy[x][y]++;
			  xy[x][y+1]++;
			  xy[x+1][y-1]++;
			  xy[x+1][y]++;
			  xy[x+1][y+1]++;
		  }else if(s==3){
			  xy[x-2][y]++;
			  xy[x-1][y-1]++;
			  xy[x-1][y]++;
			  xy[x-1][y+1]++;
			  xy[x][y-2]++;
			  xy[x][y-1]++;
			  xy[x][y]++;
			  xy[x][y+1]++;
			  xy[x][y+2]++;
			  xy[x+1][y-1]++;
			  xy[x+1][y]++;
			  xy[x+1][y+1]++;
			  xy[x+2][y]++;
		  }
	  }
	  int max=xy[0][0];
	  for(i=0;i<10;i++){
		  for(j=0;j<10;j++){
			  if(xy[i][j]==0) num++;
			  if(xy[i][j]>max) max=xy[i][j];
		  }
	  }
	  printf("%d\n%d\n",num,max);
	  return 0;
  }

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int pap[11][11],dx[]={0,1,0,-1,1,-1,1,-1,2,0,-2,0},dy[]={1,0,-1,0,1,-1,-1,1,0,2,0,-2};
int main(){
int x,y,si,l,ma,cou;
fill(pap[0],pap[0]+10*10,0);
while(scanf("%d,%d,%d",&x,&y,&si)!=EOF){
    if(si==1)l=4;
    if(si==2)l=8;
    if(si==3)l=12;
    pap[x][y]+=1;
    for(int i=0;i<l;i++){
        pap[x+dx[i]][y+dy[i]]+=1;
    }
    /*for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
        cout<<pap[i][j];
    }
    cout<<endl;
    }*/
}
for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
        //cout<<pap[i][j];
        ma=max(ma,pap[i][j]);
        if(pap[i][j]==0){
            cou++;
        }
    }
    //cout<<endl;
}
cout<<cou+2<<endl<<ma<<endl;
return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
using namespace std;

typedef long long ll;
typedef pair<int, int> P;

#define all(c) (c).begin(), (c).end()
#define pb push_back
#define mp make_pair
#define EXIST(v,i) (find(all(v), i) != (v).end())
#define ERASE(v,i) (v).erase(remove(all(v), i), (v).end())
#define INDEX(v,i) (find(all(v), i) - (v).begin())
#define rep(i,n) for(int i = 0; i < (int)n; ++i)
#define debug(x) cerr << #x << " = " << (x) << endl;

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

const int INF = 100000000;
const double PI = 3.14159265358979323846;
const double EPS = 1e-10;

int main() {
	vector<P> small;
	vector<P> midium;
	vector<P> big;
	{
		small.pb(mp(0, -1));
		small.pb(mp(0, 1));
		small.pb(mp(0, 0));
		small.pb(mp(1, 0));
		small.pb(mp(-1, 0));
	}
	{
		midium.pb(mp(-1, -1));
		midium.pb(mp(0, -1));
		midium.pb(mp(1, -1));
		midium.pb(mp(-1, 0));
		midium.pb(mp(0, 0));
		midium.pb(mp(1, 0));
		midium.pb(mp(-1, 1));
		midium.pb(mp(0, 1));
		midium.pb(mp(1, 1));
	}
	{
		big.pb(mp(-2, 0));
		big.pb(mp(-1, -1));
		big.pb(mp(-1, 0));
		big.pb(mp(-1, 1));
		big.pb(mp(0, -2));
		big.pb(mp(0, -1));
		big.pb(mp(0, 0));
		big.pb(mp(0, 1));
		big.pb(mp(0, 2));
		big.pb(mp(1, -1));
		big.pb(mp(1, 0));
		big.pb(mp(1, 1));
		big.pb(mp(2, 0));
	}
	int field[10][10];
	memset(field, 0, sizeof field);
	for(int x, y, size; scanf(" %d,%d,%d", &x, &y, &size) != EOF;) {
		vector<P> drop;
		if(size == 1) drop = small;
		else if(size == 2) drop = midium;
		else drop = big;
		for(int i = 0, n = drop.size(); i < n; i++) {
			int nx = x + drop[i].first;
			int ny = y + drop[i].second;
			if(0 <= nx && nx < 10 && 0 <= ny && ny < 10) {
				field[nx][ny]++;
			}
		}
	}
#if 0
	for(int i = 0; i < 10; i++) {
		for(int j = 0; j < 10; j++) {
			printf("%d", field[j][i]);
		}
		puts("");
	}
#endif
	int white = 0;
	int most = 0;
	rep(l, 10) {
		white += count(field[l], field[l] + 10, 0);
		most = max(most, *max_element(field[l], field[l] + 10));
	}
	printf("%d\n%d\n", white, most);
	return 0;
}