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<vector>
#include<algorithm>
using namespace std;
int main(){
  vector <vector <int> > a(13,vector<int>(13,0));
  int c,d,size,o=0;
  char s1,s2;
  while(cin>>c>>s1>>d>>s2>>size){
      c+=2;d+=2;
    if(size==1){
      a[c][d]++;
      a[c][d-1]++;
      a[c-1][d]++;
      a[c+1][d]++;
      a[c][d+1]++;
    }
    if(size==2){
      a[c][d]++;
      a[c][d-1]++;
      a[c-1][d]++;
      a[c+1][d]++;
      a[c][d+1]++;
      a[c-1][d-1]++;
      a[c+1][d+1]++;
      a[c-1][d+1]++;
      a[c+1][d-1]++;
    }
    if(size==3){
      a[c][d]++;
      a[c][d-1]++;
      a[c-1][d]++;
      a[c+1][d]++;
      a[c][d+1]++;
      a[c-1][d-1]++;
      a[c+1][d+1]++;
      a[c-1][d+1]++;
      a[c+1][d-1]++;
      a[c+2][d]++;
      a[c-2][d]++;
      a[c][d+2]++;
      a[c][d-2]++;
    }
  }
  int maxi = 0;
  for(int i = 2; i < 12; i++){
    int d = *max_element(a[i].begin(),a[i].end());
    maxi = max(maxi, d);
    for(int j = 2; j < 12; j++){
      if(a[j][i]==0) o++;
    }
  }
 cout<<o<<endl<<maxi<<endl;
}

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

int field[10][10];

int main() {
  int x,y,size; 
  char ch;
  while ( cin >> x >> ch >> y >> ch >> size ) {

    if ( x-1 >= 0 ) field[x-1][y]++;
    if ( x+1 < 10 ) field[x+1][y]++;
    if ( y-1 >= 0 ) field[x][y-1]++;
    if ( y+1 < 10 ) field[x][y+1]++;

    if ( size == 2 ) {
      if ( x+1 < 10 && y+1 < 10 ) field[x+1][y+1]++;
      if ( x-1 >= 0 && y+1 < 10 ) field[x-1][y+1]++;
      if ( x+1 < 10 && y-1 >= 0 ) field[x+1][y-1]++;
      if ( x-1 >= 0 && y-1 >= 0 ) field[x-1][y-1]++;
    } 

    if ( size == 3 ) {
      if ( x+2 < 10 ) field[x+2][y]++;
      if ( x-2 >= 0 ) field[x-2][y]++;
      if ( y+2 < 10 ) field[x][y+2]++;
      if ( y-2 >= 0 ) field[x][y-2]++;
    }

  }

  int cnt = 0,maxv = 0;

  for ( int i = 0; i < 10; i++ ) {
    for ( int j = 0; j < 10; j++ ) {
      if ( field[i][j] == 0 ) cnt++;
      maxv = max(maxv,field[i][j]);
    }
  }

  cout << cnt-1 << endl;
  cout << maxv << endl;
  
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
 
#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
#define SORT(c) sort((c).begin(),(c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
 
typedef long long ll;
typedef pair<int, int> ii;

#define EPS 1e-8

int main(){

	vector<vector<int>>cnt(10, vector<int>(10, 0));
	
	while(1){
		int x, y, c;
		if(scanf("%d,%d,%d", &x, &y, &c) == EOF)break;
		if(c == 1){
			for(int i = -1; i <= 1; i++){
				for(int j = -1; j <= 1; j++){
					if(abs(i) + abs(j) > 1) continue;
					int xx = x + i, yy = y + j;
					if(0 <= xx && xx < 10 && 0 <= yy && yy < 10)cnt[yy][xx]++;
				}
			}
		}
		else if(c == 2){
			for(int i = -1; i <= 1; i++){
				for(int j = -1; j <= 1; j++){
					int xx = x + i, yy = y + j;
					if(0 <= xx && xx < 10 && 0 <= yy && yy < 10)cnt[yy][xx]++;
				}
			}
		}
		else{
			for(int i = -2; i <= 2; i++){
				for(int j = -2; j <= 2; j++){
					if(abs(i) + abs(j) > 2) continue;
					int xx = x + i, yy = y + j;
					if(0 <= xx && xx < 10 && 0 <= yy && yy < 10) cnt[yy][xx]++;
				}
			}
		}
		
	}
	
	int free = 0;
	int maxi = 0;
	rep(i, 10){
		rep(j, 10){
			if(cnt[i][j] == 0) free++;
			maxi = max(maxi, cnt[i][j]);
		}
	}
	
	cout << free << endl << maxi << endl;
	
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<math.h>
#include<string>
#include<queue>
#include<algorithm>
#include<utility>
#include<vector>
#include<list>
using namespace std;
vector<vector<int>> pap(10, vector<int>(10, 0));
void big( int, int);
void medium(int, int);
void small(int, int);
int sx[5] = { 0,1,-1,0,0 }, sy[5] = { 0,0,0,1,-1 };
int mx[4] = { 1,1,-1,-1 }, my[4] = { 1,-1,1,-1 };
int bx[4] = { 0,0,2,-2 }, by[4] = { 2,-2,0,0 };
int nana = 100;
int main() {
	string str;
	while (cin >> str) {
		if (str[4] == '1') small(str[0]-'0', str[2] - '0');
		else if (str[4] == '2')medium(str[0]-'0', str[2] - '0');
		else if (str[4] == '3')big(str[0] - '0', str[2] - '0');
	}
	int max = -1;
	for (int i = 0; i < 10; ++i) {
		for (int j = 0; j < 10; ++j) {
			if (max < pap[i][j])max = pap[i][j];
		}
	}
	cout << nana << endl << max << endl;
	return 0;
}
void big( int x, int y) {
	for (int i = 0; i < 5; ++i) {
		if (x + sx[i] >= 0 && x + sx[i] < 10 && y + sy[i] >= 0 && y + sy[i] < 10) {
			if (pap[x + sx[i]][y + sy[i]]==0) nana--;
			pap[x + sx[i]][y + sy[i]]++;
		}
	}
	for (int i = 0; i < 4; ++i) {
		if (x + mx[i] >= 0 && x + mx[i] < 10 && y + my[i] >= 0 && y + my[i] < 10) {
			if (pap[x + mx[i]][y + my[i]]==0) nana--;
			pap[x + mx[i]][y + my[i]]++;
		}
	}
	for (int i = 0; i < 4; ++i) {
		if (x + bx[i] >= 0 && x + bx[i] < 10 && y + by[i] >= 0 && y + by[i] < 10) {
			if (pap[x + bx[i]][y + by[i]] == 0) nana--;
			pap[x + bx[i]][y + by[i]]++;
		}
	}
	return;
}
void medium( int x, int y) {
	for (int i = 0; i < 5; ++i) {
		if (x + sx[i] >= 0 && x + sx[i] < 10 && y + sy[i] >= 0 && y + sy[i] < 10) {
			if (pap[x + sx[i]][y + sy[i]] == 0) nana--;
			pap[x + sx[i]][y + sy[i]]++;
		}
	}
	for (int i = 0; i < 4; ++i) {
		if (x + mx[i] >= 0 && x + mx[i] < 10 && y + my[i] >= 0 && y + my[i] < 10) {
			if (pap[x + mx[i]][y + my[i]] == 0) nana--;
			pap[x + mx[i]][y + my[i]]++;
		}
	}
	return;
}
void small( int x, int y) {
	for (int i = 0; i < 5; ++i) {
		if (x + sx[i] >= 0 && x + sx[i] < 10 && y + sy[i] >= 0 && y + sy[i] < 10) {
			if (pap[x + sx[i]][y + sy[i]] == 0) nana--;
			pap[x + sx[i]][y + sy[i]]++;
		}
	}
	return;
}