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
//------------------------------------------
#include <bits/stdc++.h> // only for GCC

using namespace std;

//typedef
//------------------------------------------
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef pair<int, int> pii;
typedef long long ll;
typedef unsigned long long ull;

//container util
//------------------------------------------
#define all(a)  (a).begin(),(a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define mp make_pair

//repetition
//------------------------------------------
#define loop(i,a,b) for(ull i=(a);i<ull(b);++i)
#define rep(i,n) loop(i,0,n)
#define iter(i,c) for(auto i=(c).begin(); i!=(c).end(); ++i)
#define riter(i,c) for(auto i=(c).rbegin(); i!=(c).rend(); ++i)

//constant
//--------------------------------------------
const double eps = 1e-10;
const double pi  = acos(-1.0);
const double inf = (int)1e8;

// output vector
// ------------------------------------------
namespace std {
    template<typename T>ostream&operator<<(ostream&os, vector<T>const&v){
        iter(it,v) os<<*it<<(it+1==v.end()?"":",");
        return os;
    }
    template<typename T, typename U>ostream&operator<<(ostream&os,const pair<T,U>&p){
        return os << "[" << p.dirst << "," << p.second << "]";
    }
}

//clear memory
// ------------------------------------------
#define clr(a,i) memset((a), (i) ,sizeof(a))

int main(){
    int x,y,s;
    char c;
    int a[14][14]={0};
    while(cin>>x>>c>>y>>c>>s){
      if(s==1){
         a[x+2][y+2]++;
         a[x+1][y+2]++;
         a[x+2][y+1]++;
         a[x+3][y+2]++;
         a[x+2][y+3]++;
      }
      if(s==2){
         a[x+1][y+1]++;
         a[x+1][y+2]++;
         a[x+1][y+3]++;
         a[x+2][y+1]++;
         a[x+2][y+2]++;
         a[x+2][y+3]++;
         a[x+3][y+1]++;
         a[x+3][y+2]++;
         a[x+3][y+3]++;
      }
      if(s==3){
         a[x+1][y+1]++;
         a[x+1][y+2]++;
         a[x+1][y+3]++;
         a[x+2][y+1]++;
         a[x+2][y+2]++;
         a[x+2][y+3]++;
         a[x+3][y+1]++;
         a[x+3][y+2]++;
         a[x+3][y+3]++;
         a[x][y+2]++;
         a[x+2][y]++;
         a[x+2][y+4]++;
         a[x+4][y+2]++;
      }
    }
    int max=0,sum=0;
    loop(i,2,12)loop(j,2,12){
      if(a[i][j]==0) sum++;
      if(a[i][j]>max) max=a[i][j];
    }
    cout << sum << endl;
    cout << max << endl;
}

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

int main()
{
  int x, y, size;
  int canvas[10][10];
  int emp, max;
  int i, j;

  for(i=0; i<10; i++){
    for(j=0; j<10; j++) canvas[i][j]=0;
  }
  while(cin>>x){
    cin>>y; cin>>size;

    if(x>0) canvas[x-1][y]++;
    if(x<9) canvas[x+1][y]++;
    if(y>0) canvas[x][y-1]++;
    if(y<9) canvas[x][y+1]++;
    if(size>1){
      for(i=-1; i<=1; i+=2){
        for(j=-1; j<=1; j+=2){
          if(x+i>=0 && x+i<=9 && y+j>=0 && y+j<=9) canvas[x+i][y+j]++;
        }
      }
    }
    if(size>2){
      if(x>1) canvas[x-2][y]++;
      if(x<8) canvas[x+2][y]++;
      if(y>1) canvas[x][y-2]++;
      if(y<8) canvas[x][y+2]++;
    }
  }
  emp=0; max=0;
  for(i=0; i<10; i++){
    for(j=0; j<10; j++){
      if(canvas[i][j]==0) emp++;
      if(max<canvas[i][j]) max=canvas[i][j];
    }
  }
  printf("%d\n%d\n", emp, max);

  return 0;
}

C++: #define scanf_s scanf
//#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 50//00
#define MIN -100001
#define _MAX 100
#define g 9.8
#define d 4.9
int main(void)
{
	int lnk[10][10], x, y, s, max = 0, cou = 0;
	while (scanf_s("%d %d %d", &x, &y, &s) != EOF) {
		if(s == 3){
			if (x - 2 >= 0)++lnk[x - 2][y];
			if (y - 2 >= 0)++lnk[x][y - 2];
			if (x + 2 < 10)++lnk[x + 2][y];
			if (y + 2 < 10)++lnk[x][y + 2];
			for (int i = 0; i < 10; ++i) {
				if (0 <= y - 1 + (i / 3) && y - 1 + (i / 3) <= 9) {
					if (0 <= x - 1 + (i % 3) && x - 1 + (i % 3) <= 9) {
						++lnk[x - 1 + (i % 3)][y - 1 + (i / 3)];
					}
				}
			}
		}
		else if (s == 2) {
			for (int i = 0; i < 10; ++i) {
				if (0 <= y - 1 + (i / 3) && y - 1 + (i / 3) <= 9) {
					if (0 <= x - 1 + (i % 3) && x - 1 + (i % 3) <= 9) {
						++lnk[x - 1 + (i % 3)][y - 1 + (i / 3)];
					}
				}
			}
		}
		else if (s == 1) {
			if (x - 1 >= 0)++lnk[x - 1][y];
			if (y - 1 >= 0)++lnk[x][y - 1];
			if (x + 1 < 10)++lnk[x + 1][y];
			if (y + 1 < 10)++lnk[x][y + 1];
		}
	}
	for (int i = 0; i < 10; ++i) {
		for (int j = 0; j < 10; ++j) {
			if (lnk[i][j] == 0)++cou;
			if (lnk[i][j] > max) max = lnk[i][j];
		}
	}
	printf("%d\n%d\n", cou, max);
}

C++: #include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define clear(v) memset(v,0,sizeof(v))
#define ALL(v) (v).begin(),(v).end()

int table[15][15];

void pnt1(int x, int y){
	int dx[] = { 1, 0, -1, 0 }, dy[] = { 0, 1, 0, -1 };
	rep(i, 4){
		int nx = x + dx[i], ny = y + dy[i];
		if (nx >= 0 && ny >= 0 && nx < 10 && ny < 10){
			table[nx][ny]++;
		}
	}
	table[x][y]++;
}

void pnt2(int x, int y){
	int dx[] = { 1, 1, -1, -1 }, dy[] = { 1, -1, 1, -1 };
	pnt1(x, y);
	rep(i, 4){
		int nx = x + dx[i], ny = y + dy[i];
		if (nx >= 0 && ny >= 0 && nx < 10 && ny < 10){
			table[nx][ny]++;
		}
	}
}

void pnt3(int x, int y){
	int dx[] = { 2, 0, -2, 0 }, dy[] = { 0, 2, 0, -2 };
	pnt2(x, y);
	rep(i, 4){
		int nx = x + dx[i], ny = y + dy[i];
		if (nx >= 0 && ny >= 0 && nx < 10 && ny < 10){
			table[nx][ny]++;
		}
	}
}

int main(){
	int x, y, size;
	while (scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		if (size == 1) pnt1(x, y);
		else if (size == 2) pnt2(x, y);
		else pnt3(x, y);
	}
	int ans[2] = {};
	int max = 0;
	rep(i, 10) rep(j, 10) if (max < table[i][j]) max = table[i][j];
	rep(i, 10) rep(j, 10){
		if (table[i][j] == max) ans[0]++;
		if (table[i][j] == 0) ans[1]++;
	}
	printf("%d\n", ans[1]);
	printf("%d\n", max);
	return 0;
}