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 <cstdio>


#define SIZE 10

using namespace std;

int format[3][12][2] = { { { 0,1 },{ 1,0 },{ 0,-1 },{ -1,0 } },
						 { { 0,1 },{ 1,1 },{ 1,0 },{ 1,-1 },{ 0,-1 },{ -1,-1 },{ -1,0 },{ -1,1 } },
						 { { 0,1 },{ 1,1 },{ 1,0 },{ 1,-1 },{ 0,-1 },{ -1,-1 },{ -1,0 },{ -1,1 },{ 0,2 },{ 2,0 },{ 0,-2 },{ -2,0 } } };

int main() {
	int dx, dy, x, y, s, count, most, map[SIZE][SIZE], num[3] = { 4,9,12 };

	count = 100;
	most = 0;
	while (scanf("%d,%d,%d", &x, &y, &s)) {
		x--;
		y--;
		s--;

		for (int i = 0; i < num[s]; i++) {
			dx = x + format[s][i][0];
			dy = y + format[s][i][1];

			if (dx < 0 || dx >= SIZE || dy < 0 || dy >= SIZE) {
				continue;
			}

			map[dx][dy]++;
			if (map[dx][dy] == 1) {
				count--;
			}

			if (map[dx][dy] > most) {
				most = map[dx][dy];
			}
		}
	}

	cout << count << endl << most << endl;
	return 0;
}

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