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