Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func rangeCheck(x, y int) bool {
	if x >= 0 && x <= 9 && y >= 0 && y <= 9 {
		return true
	} else {
		return false
	}
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	paper := make([][]int, 10)
	for i := range paper {
		paper[i] = make([]int, 10)
		for j := range paper[i] {
			paper[i][j] = 0
		}
	}
	fmt.Println(paper)
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), ",")
		x, _ := strconv.Atoi(infos[0])
		y, _ := strconv.Atoi(infos[1])
		s, _ := strconv.Atoi(infos[2])
		// fmt.Println(x, y, s)
		switch s {
		case 1:
			paper[x][y]++
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			continue
		case 2:
			paper[x][y]++
			if rangeCheck(x-1, y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1, y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1, y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1, y+1) {
				paper[x+1][y+1]++
			}
			continue
		case 3:
			paper[x][y]++
			if rangeCheck(x-1,y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x,y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1,y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1,y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1,y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1,y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x,y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1,y+1) {
				paper[x+1][y+1]++
			}
			if rangeCheck(x,y-2) {
				paper[x][y-2]++
			}
			if rangeCheck(x-2,y) {
				paper[x-2][y]++
			}
			if rangeCheck(x+2,y) {
				paper[x+2][y]++
			}
			if rangeCheck(x,y+2) {
				paper[x][y+2]++
			}
			continue
		}
	}
	count := 0
	max := -1
	for i := range paper {
		for j := range paper[i] {
			if paper[i][j] == 0 {
				count++
			}
			if max >= paper[i][j] {
				max = max
			} else {
				max = paper[i][j]
			}
		}
	}
	fmt.Printf("%d\n%d", count, max)
}

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

using namespace std;

#pragma warning(disable : 4996)

int x, y, q, r1, r2, ok[10][10];

int main()
{
	while (~scanf("%d,%d,%d", &x, &y, &q), x--, y--)
	{
		if (q == 1)
		{
			for (int i = -1; i <= 1; i++)
			{
				for (int j = -1; j <= 1; j++)
				{
					if (abs(i) + abs(j) <= 1)
					{
						if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
						{
							ok[y + i][x + j]++;
						}
					}
				}
			}
		}

		if (q == 2)
		{
			for (int i = -1; i <= 1; i++)
			{
				for (int j = -1; j <= 1; j++)
				{
					if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
					{
						ok[y + i][x + j]++;
					}
				}
			}
		}

		if (q == 3)
		{
			for (int i = -2; i <= 2; i++)
			{
				for (int j = -2; j <= 2; j++)
				{
					if (abs(i) + abs(j) <= 2)
					{
						if (0 <= x + j && x + j < 10 && 0 <= y + i && y + i < 10)
						{
							ok[y + i][x + j]++;
						}
					}
				}
			}
		}
	}

	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			if (ok[i][j] == 0)
			{
				r1++;
			}

			if (ok[i][j] > r2)
			{
				r2 = ok[i][j];
			}
		}
	}

	printf("%d\n", r1);
	printf("%d\n", r2);

	return 0;
}

C++: 
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stack>
#include <cctype>
#include <complex>
#include <vector>
#include <algorithm>
#include <cassert>

using namespace std;


bool solve(){
	int dx1[] = {0, 1, 0, -1, 0};
	int dy1[] = {0, 0, 1, 0, -1};
	int dx2[] = {0, 0, 0, 1, 1, 1, -1, -1, -1};
	int dy2[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
	int dx3[] = {0, 0, 0, 0, 0, 1, 1, 1, 2, -1, -1, -1, -2};
	int dy3[] = {-2, -1, 0, 1, 2, -1, 0, 1, 0, -1, 0, 1, 0};

	int a[14][14] = {0};
	int x, y, size;
	char c[2];
	while(cin>>x){
		cin>> c[0]>> y>> c[1]>> size;
		x += 2;
		y += 2;
		switch(size){
			case 1:
				for(int i=0;i<5;i++){
					a[x+dx1[i]][y+dy1[i]]++;
				}
				break;
			case 2:
				for(int i=0;i<9;i++){
					a[x+dx2[i]][y+dy2[i]]++;
				}
				break;
			case 3:
				for(int i=0;i<13;i++){
					a[x+dx3[i]][y+dy3[i]]++;
				}
				break;
			default: 
				cout<< "default"<< endl;
				break;
		}
	}
	int ans = 0;
	int ans2 = 0;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(a[i][j] == 0) ans++;
			ans2 = max(ans2, a[i][j]);
		}
	}
	cout<< ans<< endl;
	cout<< ans2<< endl;
	
	return true;
}

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	solve();

	return 0;
}

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

int main() {
	int map[14][14]={{0}};
	int x,y,s;
	while(scanf("%d,%d,%d",&x,&y,&s) != EOF)
	{
		x+=2;y+=2;
		switch(s)
		{
		case 3:
			map[x-2][y]++;
			map[x+2][y]++;
			map[x][y-2]++;
			map[x][y+2]++;
		case 2:
			map[x-1][y-1]++;
			map[x-1][y+1]++;
			map[x+1][y-1]++;
			map[x+1][y+1]++;
		case 1:
			map[x-1][y]++;
			map[x+1][y]++;
			map[x][y-1]++;
			map[x][y+1]++;
			map[x][y]++;
		default:
			break;
		}
	}
	int max=0,blank=0;
	for (int i=0+2; i<10+2; i++)
	{
		for (int j=0+2; j<10+2; j++)
		{
			if (map[i][j]==0)
			{
				blank++;
			} else {
				if (max<map[i][j])
				{
					max = map[i][j];
				}
			}
		}
	}
	cout << blank << endl << max << endl;
	return 0;
}

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

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 pair<long, long> PLL;
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(long i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------

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

const long double EPS = 1e-12;
const LL INF = 1e18;

int mp[12][12];

int main(){
	int x,y,sz;
	CLR(mp);
	char c1,c2;
	while(cin>>x>>c1>>y>>c2>>sz){
		if(sz==0)break;
		x++;y++;
		if(sz==1){
			for(int dx=-1;dx<=1;dx++)for(int dy=-1;dy<=1;dy++){
				if(abs(dx)+abs(dy)<=1)mp[x+dx][y+dy]++;
			}
		}else if(sz==2){
			for(int dx=-1;dx<=1;dx++)for(int dy=-1;dy<=1;dy++){
				if(abs(dx)+abs(dy)<=1||(abs(dx)==1&&abs(dy)==1))mp[x+dx][y+dy]++;
			}
		}else{
			for(int dx=-2;dx<=2;dx++)for(int dy=-2;dy<=2;dy++){
				if(abs(dx)+abs(dy)<=2)mp[x+dx][y+dy]++;
			}
		}
	}
	int cnt=0;
	int ma=0;
	REP(i,10)REP(j,10){
		if(mp[i+1][j+1]==0)cnt++;
		ma=max(ma,mp[i+1][j+1]);
	}
	cout<<cnt<<endl;
	cout<<ma<<endl;
	return 0;
}
/*
2,5,3
3,6,1
3,4,2
4,5,2
3,6,3
2,4,1
0,0,0
*/