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++: //#define _GRIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;

// ?????¬???????????¬??????
#pragma region MACRO
#define P(x) cout << (x) << endl
#define p(x) cout << (x)
#define PED cout << "\n"
#define rep(i,n) for(int i=0; i<(int)n; ++i)
#define REP(i,x,n) for(int i=x; i<(int)n; ++i)
#define repi(i,n) for(int i=0; i<=(int)n; ++i)
#define REPI(i,x,n) for(int i=x; i<=(int)n; ++i)
#define ILP while(true)
#define FOR(i,c) for(__typeof((c).begin())!=(c).begin(); i!=(c).end(); ++i)
#define ALL(c) (c).begin(), (c).end()
#define mp make_pair
#pragma endregion

// ???
#pragma region TYPE_DEF
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<string, string> pss;
typedef pair<string, int> psi;
typedef pair<int, string> pis;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<long double> vld;
typedef vector<long> vl;
typedef vector<long long> vll;
typedef vector<string> vs;
#pragma endregion

// Effective std
#pragma region ESTD
template<typename C, typename T> int count(C& c, T t) { return count(ALL(c), t); }
template<typename C, typename F> int count_if(C& c, F f) { return count_if(ALL(c), f); }
template<typename C, typename T> void erase(C& c, T t) { remove(ALL(c), t), c.end(); }
template<typename C> void remove(vector<C>& c, unsigned int index) { c.erase(c.begin()+index); }
template<typename C, typename T, typename U> void replace(C& c, T t, U u) { replace(ALL(c), t, u); }
template<typename C, typename F, typename U> void replace_if(C& c, F f, U u) { (ALL(c), f, u); }
template<typename C> void reverse(C& c) { reverse(ALL(c)); }
template<typename C> void sort(C& c) { sort(ALL(c)); }
template<typename C, typename Pred> void sort(C& c, Pred p) { sort(ALL(c), p); }
#pragma endregion

// ?????°
#pragma region CONST_VAL
constexpr int PI = (2*acos(0.0));
constexpr int EPS = (1e-9);
constexpr int MOD = (int)(1e9+7);
constexpr int INF = 100000000;
#pragma endregion

int x, y, s;
int a[15][15] = {0};

int main()
{
    while(scanf("%d,%d,%d", &x, &y, &s)!=EOF) {
        swap(x, y);
        a[x][y]++;
        if(x>0)a[x-1][y]++;
        if(y>0)a[x][y-1]++;
        a[x+1][y]++;
        a[x][y+1]++;
        if(s>1) {
            if(x>0&&y>0)a[x-1][y-1]++;
            if(x>0)a[x-1][y+1]++;
            if(y>0)a[x+1][y-1]++;
            a[x+1][y+1]++;
        }
        if(s>2) {
            if(x>1)a[x-2][y]++;
            if(y>1)a[x][y-2]++;
            a[x+2][y]++;
            a[x][y+2]++;
        }
        int ans = 0, mx = 0;
        rep(i,10) {
            rep(j,10) {
                if(a[i][j]==0)ans++;
                if(a[i][j]>mx)mx = a[i][j];
            }
        }
        P(ans);
        P(mx);
    }
    return 0;
}

C++: #include<iostream>
#include<vector>
#include <algorithm>
#include<stdio.h>
int main(){
	int x,y,size;
	std::vector<std::vector<int>> vec(10,std::vector<int>(10,0));
	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		vec[y][x]++;
		vec[y-1][x]++;
		vec[y+1][x]++;
		vec[y][x-1]++;
		vec[y][x+1]++;
		if(size>=2){
			vec[y-1][x-1]++;
			vec[y-1][x+1]++;
			vec[y+1][x-1]++;
			vec[y+1][x+1]++;
		}
		if(size==3){
			vec[y-2][x]++;
			vec[y+2][x]++;
			vec[y][x-2]++;
			vec[y][x+2]++;
		}
	}
	std::vector<int> vec2(100);
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++)vec2[i*10+j]=vec[i][j];
	}
	int no=0;
	for(int i=0;i<100;i++){
		if(vec2[i]==0)no++;
	}
	std::cout<<no<<std::endl;
	sort(vec2.begin(),vec2.end(),std::greater<int>());
	std::cout<<vec2[0]<<std::endl;
	return 0;
}

C++: #include <stdio.h>
int main() {
    int RB[10][10],i,j,k;for (i=0;i<10;i++) for (j=0;j<10;RB[i][j++]=0);while (scanf("%d,%d,%d",&i,&j,&k)!=EOF) {
        RB[i][j]++;if (i) RB[i-1][j]++;if (i<9) RB[i+1][j]++;if (j) RB[i][j-1]++;if (j<9) RB[i][j+1]++;if (k>1) {if (i*j) RB[i-1][j-1]++;if (i<9 && j<9) RB[i+1][j+1]++;if (i && j<9) RB[i-1][j+1]++;if (i<9 && j) RB[i+1][j-1]++;} if (k==2) {if (i>1) RB[i-2][j]++;if (i<8) RB[i+2][j]++;if (j>1) RB[i][j-2]++;if (j<8) RB[i][j+2]++;}}
    for (i=0,k=100;i<10;i++) for (j=0;j<10;j++) if (RB[i][j]) k--;printf("%d\n",k);for (i=0,k=0;i<10;i++) for (j=0;j<10;j++) if (RB[i][j]>k) k=RB[i][j];printf("%d\n",k);return 0;}

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

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

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

    for(i=-1; i<=1; i+2)
      if(x+i>=0 && x+i<10) canvas[x+i][y]++;
    for(i=-1; i<=1; i+2)
      if(y+i>=0 && y+i<10) canvas[x][y+i]++;
    if(size>1){
      for(i=-1; i<=1; i+2){
        for(j=-1; j<=1; j+2)
          if(x+i>=0 && x+i<10 && y+j>=0 && y+j<10) canvas[x+i][y+j]++;
      }
    }
    if(size>2){
      for(i=-2; i<=2; i+4){
        for(j=-2; j<=2; j+4)
          if(x+i>=0 && x+i<10 && y+j>=0 && y+j<10) canvas[x+i][y+j]++;
      }
    }

    empty_num=0; max_val=0;
    for(i=0; i<10; i++){
      for(j=0; j<10; j++){
        if(canvas[i][j]>max_val) max_val=canvas[i][j];
        else if(canvas[i][j]==0) empty_num++;
      }
    }

    printf("%d\n%d\n", empty_num, max_val);
  }
  return 0;
}

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

int main(){
	int x,y,s;
	char b;
	int n=10;
	int x1[]={1,0,-1,0};
	int y1[]={0,1,0,-1};
	int x2[]={1,1,-1,-1};
	int y2[]={1,-1,1,-1};
	int x3[]={2,0,-2,0};
	int y3[]={0,2,0,-2};
	
	vector<vector<int> > a(n,vector<int>(n,0));
	while(cin>>x>>b>>y>>b>>s){
		//if(x==-1)break;
		a[x][y]++;
		for(int i=0;i<4;i++){
			if(x+x1[i]>-1&&y+y1[i]>-1&&x+x1[i]<10&&y+y1[i]<10){
				a[x+x1[i]][y+y1[i]]++;
			}
		}
		
		if(s>1){
				for(int i=0;i<4;i++){
				if(x+x2[i]>-1&&y+y2[i]>-1&&x+x2[i]<10&&y+y2[i]<10){
					a[x+x2[i]][y+y2[i]]++;
				}
			}
		}
		
		if(s>2){
				for(int i=0;i<4;i++){
				if(x+x3[i]>-1&&y+y3[i]>-1&&x+x3[i]<10&&y+y3[i]<10){
					a[x+x3[i]][y+y3[i]]++;
				}
			}
		}
	}
	int ans=0;
	int ans2=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(a[i][j]==0)ans++;
			ans2=max(ans2,a[i][j]);
		}
	}
	
	cout<<ans<<" "<<ans2<<endl;
	return 0;
}