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 <bits/stdc++.h>
using namespace std;

#define rep(i,a,n) for(int i=a; i<n; i++)
#define repr(i,a,n) for(int i=a; i>=n; i--)
#define pb(a) push_back(a)
#define fr first
#define sc second
#define INF 999999999

#define X real()
#define Y imag()
#define EPS (1e-10)
#define EQ(a,b) (abs((a) - (b)) < EPS)
#define EQV(a,b) ( EQ((a).X, (b).X) && EQ((a).Y, (b).Y) )
#define LE(n, m) ((n) < (m) + EPS)
#define GE(n, m) ((n) + EPS > (m))

typedef vector<int> VI;
typedef vector<VI> MAT;
typedef pair<int, int> pii;
typedef long long int ll;

typedef complex<double> P;
typedef pair<P, P> L;
typedef pair<P, double> C;

int const MOD = 1000000007;
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
int dx[8] = {1, 0, -1, 0, 1, -1, 1, -1};

int main() {
    int a[10][10];
    memset(a, 0, sizeof(a));
    int x,y,s;
    while(~scanf("%d,%d,%d", &x, &y, &s)) {
        if(s == 1) {
            if(x + 1 <= 9) a[x + 1][y]++;
            if(x - 1 >= 0) a[x - 1][y]++;
            if(y + 1 <= 9) a[x][y + 1]++;
            if(y - 1 >= 0) a[x][y - 1]++;
        }
        else if(s == 2) {
            rep(i,0,8) {
                if(x + dx[i] < 0) continue;
                else if(x + dx[i] > 9) continue;
                else if(y + dy[i] < 0) continue;
                else if(y + dy[i] > 9) continue;
                else a[x + dx[i]][y + dy[i]]++;
            }
        }
        else {
            rep(i,0,8) {
                if(x + dx[i] < 0) continue;
                else if(x + dx[i] > 9) continue;
                else if(y + dy[i] < 0) continue;
                else if(y + dy[i] > 9) continue;
                else a[x + dx[i]][y + dy[i]]++;
            }
            if(x + 2 <= 9) a[x + 2][y]++;
            if(x - 2 >= 0) a[x - 2][y]++;
            if(y + 2 <= 9) a[x][y + 2]++;
            if(y - 2 >= 0) a[x][y - 2]++;
        }
    }

    int m_point = 0;
    int max_num = 0;
    rep(i,0,10) rep(j,0,10) {
        if(a[i][j] == 0) m_point++;
        max_num = max(max_num, a[i][j]);
    }
    cout << m_point << endl;
    cout << max_num << endl;

    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;

#define EACH(i,a) for (auto& i : a)
#define FOR(i,a,b) for (ll i=(a);i<(b);i++)
#define RFOR(i,a,b) for (ll i=(b)-1;i>=(a);i--)
#define REP(i,n) for (ll i=0;i<(n);i++)
#define RREP(i,n) for (ll i=(n)-1;i>=0;i--)
#define debug(x) cout<<#x<<": "<<x<<endl
#define pb push_back
#define ALL(a) (a).begin(),(a).end()

const ll linf = 1e18;
const int inf = 1e9;
const double eps = 1e-12;
const double pi = acos(-1);

template<typename T>
istream& operator>>(istream& is, vector<T>& vec) {
	EACH(x,vec) is >> x;
	return is;
}
template<typename T>
ostream& operator<<(ostream& os, vector<T>& vec) {
	REP(i,vec.size()) {
		if (i) os << " ";
		os << vec[i];
	}
	return os;
}
template<typename T>
ostream& operator<<(ostream& os, vector< vector<T> >& vec) {
	REP(i,vec.size()) {
		if (i) os << endl;
		os << vec[i];
	}
	return os;
}

vector< vector<int> > v[3] = {
	{
		{0,1,0},
		{1,1,1},
		{0,1,0},
	},
	{
		{1,1,1},
		{1,1,1},
		{1,1,1},
	},
	{
		{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 main() {
//	std::ios::sync_with_stdio(false);
//	std::cin.tie(0);
	int x, y, sz;
	const int W = 10, H = 10;
	vector< vector<int> > m(H, vector<int>(W, 0));
	while ( scanf("%d,%d,%d", &x, &y, &sz) != EOF ) {
		--sz;
		x -= v[sz].size()/2;
		y -= v[sz].size()/2;
		REP(dy, v[sz].size()) {
			REP(dx, v[sz][dy].size()) {
				int nx = x + dx, ny = y + dy;
				if (nx < 0 || nx >= W || ny < 0 || ny >= H) continue;
				m[ny][nx] += v[sz][dy][dx];
			}
		}
	}
//	cout << m << endl;
	int ans = 0, cnt = 0;
	REP(i, H) REP(j, W) {
		if (m[i][j] == 0) ++cnt;
		ans = max(ans, m[i][j]);
	}
	cout << cnt << endl;
	cout << ans << endl;
}

C++: #include <iostream>

using namespace std;

int paper[10][10];

void init() {
    for (int i = 0; i < 10; i++) 
        for (int j = 0; j < 10; j++) 
            paper[i][j] = 0;
}

void drop_small(int x, int y) {
    paper[y][x]++;
    int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
    for (int i = 0; i < 4; i++) {
        if (y + dy[i] >= 10 || x + dx[i] >= 10) continue;
        if (y + dy[i] < 0  || x + dx[i] < 0 ) continue;
        paper[ y+dy[i] ][ x+dx[i] ]++;
    }
}

void drop_middle(int x, int y) {
    drop_small(x, y);
    int dx[4] = {1, 1, -1, -1}, dy[4] = {1, -1, 1, -1};
    for (int i = 0; i < 4; i++) {
        if (y + dy[i] >= 10 || x + dx[i] >= 10) continue;
        if (y + dy[i] < 0  || x + dx[i] < 0 ) continue;
        paper[ y+dy[i] ][ x+dx[i] ]++;
    }
}
    
void drop_large(int x, int y) {
    drop_middle(x, y);
    int dx[4] = {2, 0, -2, 0}, dy[4] = {0, 2, 0, -2};
    for (int i = 0; i < 4; i++) {
        if (y + dy[i] >= 10 || x + dx[i] >= 10) continue;
        if (y + dy[i] < 0  || x + dx[i] < 0 ) continue;
        paper[ y+dy[i] ][ x+dx[i] ]++;
    }
}

int main() {
    init();
    int x, y, s;
    char d;
    while (cin >> x >> d >> y >> d >> s) {
        switch (s) {
            case 1:
                drop_small(x, y);
                break;
            case 2:
                drop_middle(x, y);
                break;
            case 3:
                drop_large(x, y);
                break;
        }
    }

    int most = 0;
    int clean = 0;

    for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) {
            if (paper[i][j] == 0) clean++;
            if (paper[i][j] > most) most = paper[i][j];
        }
    }

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