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\n", count, max)
}

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

int main(){
int a[14][14];
for(int i=0;i<14;i++){
for(int j=0;j<14;j++){
a[i][j]=0;}}
int x,y,s;
int big=0,ans=0;
while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
if(s==1){
a[x+2][y+2]++;
a[x+1][y+2]++;
a[x+3][y+2]++;
a[x+2][y+1]++;
a[x+2][y+3]++;
}
if(s==2){
for(int i=1;i<4;i++){
for(int j=1;j<4;j++){
a[x+i][y+j]++;}}
}
if(s==3){
for(int i=1;i<4;i++){
for(int j=1;j<4;j++){
a[x+i][y+j]++;}}
a[x][y+2]++;
a[x+4][y+2]++;
a[x+2][y]++;
a[x+2][y+4]++;
}}
for(int i=2;i<12;i++){
for(int j=2;j<12;j++){
if(a[i][j]==0){ans++;}
if(big<a[i][j]){big=a[i][j];}}}
cout<<ans<<endl<<big<<endl;}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
    int paper[15][15] = {{0}};
    int x,y,size;
    while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF)
    {
        x+=2;
        y+=2;
        if(size==1)
        {
            paper[x][y]+=1;paper[x+1][y]+=1;paper[x-1][y]+=1;paper[x][y-1]+=1;paper[x][y+1]+=1;
        }
        if(size==2)
        {
            paper[x][y]+=1;paper[x-1][y+1]+=1;paper[x-1][y]+=1;paper[x-1][y-1]+=1;paper[x][y+1]+=1;paper[x][y-1]+=1;paper[x+1][y-1]+=1;paper[x+1][y]+=1;paper[x+1][y+1]+=1;
        }
        if(size==3)
        {
            paper[x][y]+=1;paper[x-1][y+1]+=1;paper[x-1][y]+=1;paper[x-1][y-1]+=1;paper[x][y+1]+=1;paper[x][y-1]+=1;paper[x+1][y-1]+=1;paper[x+1][y]+=1;paper[x+1][y+1]+=1;paper[x+2][y]+=1;paper[x-2][y]+=1;paper[x][y+2]+=1;paper[x][y-2]+=1;
        }
    }
    int max=0,voi=0;
    for(int i=2;i<=11;i++)
    {
        for(int j=2;j<=11;j++)
        {
            if(paper[i][j]>max)max=paper[i][j];
            if(paper[i][j]==0)voi++;
        }
    }
    cout<<voi<<endl<<max<<endl;
    return 0;
}

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

// clang-format off
#define GET_MACRO(_1, _2, _3, _4, NAME, ...) NAME
#define rep(...) GET_MACRO(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)
#define rep1(n) rep2(_, n)
#define rep2(i, n) rep3(i, 0, n)
#define rep3(i, a, n) rep4(i, a, n, 1)
#define rep4(i, a, n, s) for (lint i = (a); i < (lint)(n); i += s)
#define rrep(...) GET_MACRO(__VA_ARGS__, rrep4, rrep3, rrep2, rrep1)(__VA_ARGS__)
#define rrep1(a) rrep2(_, a)
#define rrep2(i, a) rrep3(i, a, 0)
#define rrep3(i, a, n) rrep4(i, a, n, 1)
#define rrep4(i, a, n, s) for (lint i = (a); i >= (lint)(n); i -= s)
#define each(i, ctn) for (auto &&i : (ctn))

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define all(v) begin(v), end(v)
#define debug(x) cerr << (x) << " (L:" << __LINE__ << ")" << '\n'
#define TEMP_T template <class T>
#define TEMP_TU template <class T, class U>

TEMP_T using vec = vector<T>;
TEMP_T using heap = priority_queue<T>;
TEMP_T using minheap = priority_queue<T, vec<T>, greater<T>>;
using lint = long long;
using ulint = unsigned long long;
using ld = long double;
using vi = vec<int>;
using vvi = vec<vi>;
using vvvi = vec<vvi>;
using pii = pair<int, int>;
using vs = vec<string>;

TEMP_TU ostream &operator<<(ostream &os, const pair<T, U> &p) { return os << p.fi << " " << p.se; }
TEMP_TU istream &operator>>(istream &is, pair<T, U> &p) { return is >> p.fi >> p.se; }

const int INF{1001001001};
const lint LINF{1001001001001001001ll};
const int MOD{(int)1e9 + 7};
const double EPS{1e-9};
const double PI{acos(-1)};
const int dx[]{0, 1, 0, -1, 1, -1, 1, -1}, dy[]{1, 0, -1, 0, 1, -1, -1, 1};

inline bool inside(int y, int x, int h, int w) { return y >= 0 && x >= 0 && y < h && x < w; }
TEMP_T inline bool chmin(T &a, const T &b) { if (a > b) a = b; return a > b; }
TEMP_T inline bool chmax(T &a, const T &b) { if (a < b) a = b; return a < b; }
TEMP_T inline void print(const T &x) { cout << x << '\n'; }
TEMP_T inline void print(const vec<T> &v, string d = "\n") { rep(i, v.size()) cout << v[i] << (i == v.size() - 1 ? "\n" : d); }
template <class T = int> inline T in() { T x; cin >> x; return x; }
template <class T = string> vector<T> split(const string &s, char d = ',') {
  vector<T> v; stringstream ss(s); for (string b; getline(ss, b, d); ) {
    stringstream conv(b); T t; conv >> t; v.eb(t); } return v;
}
struct pre_ { pre_() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(12); } } pre__;
// clang-format on
/* }}} */

const int ddx[]{2, 0, -2, 0}, ddy[]{0, 2, 0, -2};

signed main() {
  vvi f(10, vi(10, 0));
  for (string s; cin >> s; ) {
    auto v = split<int>(s);
    int ny = v[1], nx = v[0];
    ++f[ny][nx];
    if (v[2] == 1) rep(i, 4) if (inside(ny + dy[i], nx + dx[i], 10, 10)) ++f[ny + dy[i]][nx + dx[i]];
    if (v[2] == 2 || v[2] == 3) rep(i, 8) if (inside(ny + dy[i], nx + dx[i], 10, 10)) ++f[ny + dy[i]][nx + dx[i]];
    if (v[2] == 3) rep(i, 4) if (inside(ny + ddy[i], nx + ddx[i], 10, 10)) ++f[ny + ddy[i]][nx + ddx[i]];
  }
  int cnt = 0, ma = 0;
  rep(i, 10) cnt += count(all(f[i]), 0);
  rep(i, 10) chmax(ma, *max_element(all(f[i])));
  print(cnt); print(ma);
}