Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func rangeCheck(x, y int) bool {
	if x >= 0 && x <= 9 && y >= 0 && y <= 9 {
		return true
	} else {
		return false
	}
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	paper := make([][]int, 10)
	for i := range paper {
		paper[i] = make([]int, 10)
		for j := range paper[i] {
			paper[i][j] = 0
		}
	}
	// fmt.Println(paper)
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), ",")
		x, _ := strconv.Atoi(infos[0])
		y, _ := strconv.Atoi(infos[1])
		s, _ := strconv.Atoi(infos[2])
		// fmt.Println(x, y, s)
		switch s {
		case 1:
			paper[x][y]++
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			continue
		case 2:
			paper[x][y]++
			if rangeCheck(x-1, y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1, y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1, y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1, y+1) {
				paper[x+1][y+1]++
			}
			continue
		case 3:
			paper[x][y]++
			if rangeCheck(x-1,y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x,y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1,y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1,y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1,y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1,y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x,y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1,y+1) {
				paper[x+1][y+1]++
			}
			if rangeCheck(x,y-2) {
				paper[x][y-2]++
			}
			if rangeCheck(x-2,y) {
				paper[x-2][y]++
			}
			if rangeCheck(x+2,y) {
				paper[x+2][y]++
			}
			if rangeCheck(x,y+2) {
				paper[x][y+2]++
			}
			continue
		}
	}
	count := 0
	max := -1
	for i := range paper {
		for j := range paper[i] {
			if paper[i][j] == 0 {
				count++
			}
			if max >= paper[i][j] {
				max = max
			} else {
				max = paper[i][j]
			}
		}
	}
	fmt.Printf("%d\n%d\n", count, max)
}

C++: #include <stdio.h>
  int xy[15][15]={};
  int main(){
      int x,y,s,i,j,num=0;
      while(scanf("%d,%d,%d",&x,&y,&s) != EOF){
          if(s==1){
              xy[x][y]++;
              xy[x-1][y]++;
              xy[x+1][y]++;
              xy[x][y-1]++;
              xy[x][y+1]++;
          }else if(s==2){
              xy[x-1][y-1]++;
              xy[x-1][y]++;
              xy[x-1][y+1]++;
              xy[x][y-1]++;
              xy[x][y]++;
              xy[x][y+1]++;
              xy[x+1][y-1]++;
              xy[x+1][y]++;
              xy[x+1][y+1]++;
          }else if(s==3){
              xy[x-2][y]++;
              xy[x-1][y-1]++;
              xy[x-1][y]++;
              xy[x-1][y+1]++;
              xy[x][y-2]++;
              xy[x][y-1]++;
              xy[x][y]++;
              xy[x][y+1]++;
              xy[x][y+2]++;
              xy[x+1][y-1]++;
              xy[x+1][y]++;
              xy[x+1][y+1]++;
              xy[x+2][y]++;
          }
      }
      int max=xy[0][0];
      for(i=0;i<10;i++){
          for(j=0;j<10;j++){
              if(xy[i][j]==0) num++;
              if(xy[i][j]>max) max=xy[i][j];
          }
      }
      printf("%d\n%d\n",num,max);
      return 0;
  }

C++: #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for(int i=0; i<(n); ++i)
#define FOR(i, m, n) for(int i=(m); i<(n); ++i)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define mp make_pair
#define pb push_back
#define Cout(x) cout << (x) << endl
#define dump(x) cerr << #x << " = " << (x) << endl;
typedef long long LL;
typedef vector<int> VI;
typedef vector<long long> VL;
typedef vector<string> VS;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
const int inf = (int)1e9;
const long long mod = 998244353LL;
const double pi = acos(-1.0);

bool Check(int x, int y) {
	return x >= 0 && y >= 0 && x < 10 && y < 10;
}

int dx[] = { 0,0 ,1,0,-1,-1,1,1,-1,0,2,0,-2 };
int dy[] = { 0,-1,0,1,0 ,-1,-1,1,1,-2,0,2,0 };

int main() {
	VVI p(10, VI(10));
	int x, y, s; char cha;
	while (cin >> x >> cha >> y >> cha >> s) {
		int c = s == 1 ? 5 : s == 2 ? 9 : 14;
		rep(i, c) {
			int X = x + dx[i], Y = y + dy[i];
			if (Check(X, Y))p[Y][X]++;
		}
	}

	int cnt = 0, ma = -1;
	rep(i, 10)rep(j, 10) {
		ma = max(ma, p[i][j]);
		cnt += p[i][j] == 0;
	}
	Cout(cnt);
	Cout(ma);
}

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

//int dx[] = {0,1,0,-1}, dy[] = {1,0,-1,0};

int main(){
	int x, y, s;
	int board[10][10] = {{0}};
	while( ~scanf("%d,%d,%d", &x, &y, &s) ){
		if( s == 3 ){
			for(int i=-2; i<3; i++){
				for(int j=-2; j<3; j++){
					if( abs(i)+abs(j) < 3 && 0 < x+j && x+j < 10 && 0 < y+i && y+i < 10 ) board[y+i][x+j]++;
				}
			}
		}else if( s == 2 ){
			for(int i=-1; i<2; i++){
				for(int j=-1; j<2; j++){
					if( 0 < x+j && x+j < 10 && 0 < y+i && y+i < 10 ) board[y+i][x+j]++;
				}
			}
		}else{
			for(int i=-1; i<2; i++){
				for(int j=-1; j<2; j++){
					if( abs(i)+abs(j) < 2 && 0 < x+j && x+j < 10 && 0 < y+i && y+i < 10 ) board[y+i][x+j]++;
				}
			}
		}
	}
	int max_c = 0, white = 0;
	for(int i=0; i<10; i++){
		for(int j=0; j<10; j++){
			if( board[i][j] == 0 ) white++;
			max_c = max(max_c, board[i][j]);
		}
	}
	cout << white << endl;
	cout << max_c << endl;
}

C++: #include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
#include <string>
#include <queue>
#include <algorithm>
#include <cctype>
#define shosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef pair<int,P> pip;
typedef vector<pip> vip;
const int inf=1<<30;
const double pi=acos(-1);

int x,y,s,num=0,ans=-1,vx[8]={-1,-1,-1,0,0,1,1,1},vy[8]={1,0,-1,1,-1,1,0,-1};
char t;
vvi field(10,vi(10));

void func(int a,int b){
	for(int i=0;i<8;i++){
		int ca=a+vx[i],cb=b+vy[i];
		if(ca>=0&&ca<10&&cb>=0&&cb<10) field[ca][cb]++;
	}
}

int main(){
	while(cin>>x>>t>>y>>t>>s){
		func(x,y);
		if(s==2) continue;
		if(s==1){
			int dx[4]={-1,-1,1,1},dy[4]={1,-1,1,-1};
			for(int i=0;i<4;i++){
				int cax=x+dx[i],cay=y+dy[i];
				if(cax>=0&&cax<10&&cay>=0&&cay<10) field[cax][cay]--;
			}
		}
		else{
			int dx[4]={-2,0,0,2},dy[4]={0,2,-2,0};
			for(int i=0;i<4;i++){
				int cax=x+dx[i],cay=y+dy[i];
				if(cax>=0&&cax<10&&cay>=0&&cay<10) field[cax][cay]++;
			}
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(!field[i][j]) num++;
			ans=max(ans,field[i][j]);
		}
	}
	cout<<num<<endl;
	cout<<ans<<endl;
}