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 <cstdio>
#include <cstdlib>
#define rep(i, n) for(int i = 0; i < (n); ++i)

int p[11][11];
int main()
{
	int dx[] = { -1, 0, 0, 1, -1, -1, 1, 1, -2, 0, 0, 2 };
	int dy[] = { 0, -1, 1, 0, -1, 1, -1, 1, 0, -2, 2, 0 };
	int x, y, s;
	rep(i, 10) rep(j, 10) p[i][j] = 0;
	while (scanf("%d,%d,%d", &x, &y, &s) == 3) {
		p[y][x]++;
		rep(i, 4 * s) {
			int r = y + dy[i];
			int c = x + dx[i];
			if (r < 0 || r > 9 || c < 0 || c > 9) continue;
			p[r][c]++;
		}
	}
	int c = 0, best = 0;
	rep(i, 10) rep(j, 10) {
		if (p[i][j] == 0) c++;
		if (best < p[i][j]) best = p[i][j];
	}
	printf("%d\n%d\n", c, best);
	return 0;
}

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

int main() {
	int pap[10][10] = {};
	int x, y, s;
	while (scanf("%d,%d,%d", &x, &y, &s) + 1) {
		int ca = 0;
		int p = 0;

		if (s == 1) {pap[x][y] += 1;}
			if (x + 1 < 10) { pap[x + 1][y] += 1; }
			if (x - 1 > -1) { pap[x - 1][y] += 1; }
			if (y + 1 < 10) { pap[x][y + 1] += 1; }
			if (y - 1 > -1) { pap[x][y - 1] += 1; }

			if (s == 2) {pap[x][y] += 1;}
			if (x + 1 < 10) { pap[x + 1][y] += 1; }
			if (x - 1 > -1) { pap[x - 1][y] += 1; }
			if (y + 1 < 10) { pap[x][y + 1] += 1; }
			if (y - 1 > -1) { pap[x][y - 1] += 1; }
			if (x + 1 < 10 && y - 1 > -1) { pap[x + 1][y - 1] += 1; }
			if (x + 1 < 10 && y + 1 < 10) { pap[x + 1][y + 1] += 1; }
			if (x - 1 > -1 && y + 1 < 10) { pap[x - 1][y + 1] += 1; }
			if (x - 1 > -1 && y - 1 > -1) { pap[x - 1][y - 1] += 1; }

			if (s == 3) {pap[x][y] += 1;}
			if (x + 1 < 10) { pap[x + 1][y] += 1; }
			if (x - 1 > -1) { pap[x - 1][y] += 1; }
			if (y + 1 < 10) { pap[x][y + 1] += 1; }
			if (y - 1 > -1) { pap[x][y - 1] += 1; }
			if (x + 1 < 10 && y - 1 > -1) { pap[x + 1][y - 1] += 1; }
			if (x + 1 < 10 && y + 1 < 10) { pap[x + 1][y + 1] += 1; }
			if (x - 1 > -1 && y + 1 < 10) { pap[x - 1][y + 1] += 1; }
			if (x - 1 > -1 && y - 1 > -1) { pap[x - 1][y - 1] += 1; }
			if (x + 2 < 10) { pap[x + 2][y] += 1; }
			if (x - 2 > -1) { pap[x - 2][y] += 1; }
			if (y + 2 < 10) { pap[x][y + 2] += 1; }
			if (y - 2 > -1) { pap[x][y - 2] += 1; }
		
			for (int i = 0; i < 10; i++) {
				for (int j = 0; j < 10; j++) {
					if (pap[i][j] == 0) { ca++; }
					if (p < pap[i][j]) { p = pap[i][j]; }
				}
			}

			cout << ca << endl << p << endl;
	}
	return 0;
}

C++: #include<iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<sstream>
#include<algorithm>
#include<map>
#include<complex>
using namespace std;


#define li			long long int
#define rep(i,to)	for(int i=0;i<((int)(to));i++)
#define repp(i,start,to)	for(int i=(int)(start);i<((int)(to));i++)
#define pb			push_back
#define sz(v)		((li)(v).size())
#define bgn(v)		((v).begin())
#define eend(v)		((v).end())
#define allof(v)	(v).begin(), (v).end()
#define dodp(v,n)		memset(v,(li)n,sizeof(v))
#define bit(n)		(1ll<<(li)(n))
#define mp(a,b)		make_pair(a,b)
#define rin	rep(i,n)
#define EPS 1e-10
#define ETOL 1e-8
#define MOD 1000000007
#define F first
#define S second
#define p2(a,b)		cout<<a<<"\t"<<b<<endl
#define p3(a,b,c)		cout<<a<<"\t"<<b<<"\t"<<c<<endl

int main(){
	li dx[13]={ 0, -1,  1,  0,  0,  1,  1, -1, -1,  2, -2,  0,  0};
	li dy[13]={ 0,  0,  0, -1,  1,  1, -1,  1, -1,  0,  0,  2, -2};
	li lim[3]={ 5, 9, 13};
	
	li kami[10][10];
	rep(i,10)rep(j,10)kami[i][j]=0;
	
	int x,y,s;
	while(~scanf("%d,%d,%d", &x, &y, &s)){
		rep(i,lim[s-1]){
			li nx=x+dx[i];
			li ny=y+dy[i];
			if(min(nx,ny)>=0 && max(nx,ny)<10)kami[nx][ny]++;
		}
		
	}
	
	li siro=0;
	li ma=0;
	
	rep(i,10){
		rep(j,10){
			ma=max(ma,kami[i][j]);
			if(kami[i][j]==0)siro++;
		}
	}
	cout<<siro<<endl<<ma<<endl;
	
	return 0;
}

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

int small[3][3] = {0, 1, 0,
		   1, 1, 1,
		   0, 1, 0};
int normal[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 map[10][10];
int x, y, size;
int white = 0;
int black = 0;

int main(){
	while(scanf("%d,%d,%d", &x, &y, &size) != EOF){
		switch(size){
			case 1:
				for(int i = 0; i < 3; i++){
					for(int j = 0; j < 3; j++){
						if(0 <= x-1+i && x-1+i < 10 && 0 <= y-1+j && y-1+j < 10)
							map[x-1+i][y-1+j] += small[i][j];
					}
				}
				break;
			case 2:
				for(int i =0; i < 3; i++){
					for(int j=0; j < 3; j++){
						if(0 <= x-1+i && x-1+i < 10 && 0 <= y-1+j && y-1+j < 10)
							map[x-1+i][y-1+j] += normal[i][j];
					}
				}
				break;
			case 3:
				for(int i=0; i < 5; i++){
					for(int j=0; j < 5; j++){
						if(0 <= x-1+i && x-1+i < 10 && 0 <= y-1+j && y-1+j < 10)
							map[x-2+i][y-2+j] += big[i][j];
					}
				}
				break;
		}
	}
	for(int i=0; i < 10; i++){
		for(int j=0; j < 10; j++){
			if(map[i][j] == 0) white++;
			black = max(black, map[i][j]);
		}
	}

	cout << white << endl;
	cout << black << endl;

}