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 main()
{
	int x,y,s,p[10][10]={0},nou=0,nul=0;
	while(scanf("%d,%d,%d",&x,&y,&s)!=EOF){
		p[x][y]++;
		p[x-1][y]++;
		p[x][y-1]++;
		p[x+1][y]++;
		p[x][y+1]++;
		if(s!=1){
			p[x+1][y+1]++;
			p[x+1][y-1]++;
			p[x-1][y-1]++;
			p[x-1][y+1]++;
			if(s==3){
				p[x-2][y]++;
				p[x+2][y]++;
				p[x][y-2]++;
				p[x][y+2]++;
			}
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(p[i][j]==0){
				nul++;
			}
			if(p[i][j]>nou){
				nou=p[i][j];
			}
		}
	}
	printf("%d\n%d\n",nul,nou);
	return 0;
}

C++: # include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
# include <list>
constexpr int MOD = 1000000007;
constexpr int INF = 2000000000;
using namespace std;


int main() {
	int map[50][50] = { 0 };
	int a, b, c;
	char ch;
	while (cin >> a >> ch >> b >> ch >> c) {
		if (c == 1) {
			map[b + 1][a]++;
			map[b - 1][a]++;
			map[b][a + 1]++;
			map[b][a - 1]++;
		}
		else if (c == 2) {
			map[b - 1][a - 1]++;
			map[b - 1][a]++;
			map[b - 1][a + 1]++;
			map[b][a + 1]++;
			map[b + 1][a + 1]++;
			map[b + 1][a]++;
			map[b + 1][a - 1]++;
			map[b][a - 1]++;
		}
		else {
			map[b - 1][a - 1]++;
			map[b - 1][a]++;
			map[b - 1][a + 1]++;
			map[b][a + 1]++;
			map[b + 1][a + 1]++;
			map[b + 1][a]++;
			map[b + 1][a - 1]++;
			map[b][a - 1]++;
			map[b + 2][a]++;
			map[b - 2][a]++;
			map[b][a + 2]++;
			map[b][a - 2]++;
		}
	}
	int ans = 0, maxl = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (!map[i][j])ans++;
			maxl = max(maxl, map[i][j]);
		}
	}
	cout << ans << endl << maxl << endl;
}

C++: //36
#include<iostream>
#include<algorithm>

using namespace std;

int main(){
  int paper[10][10]={{}};
  for(int x,y,s;((cin>>x).ignore()>>y).ignore()>>s;){
    static const int dx[]={0,1,0,-1};
    static const int dy[]={1,0,-1,0};
    if(s==1){
      paper[y][x]++;
      for(int i=0;i<4;i++){
	int ny=y+dy[i];
	int nx=x+dx[i];
	if(0<=ny&&ny<10&&0<=nx&&nx<10){
	  paper[ny][nx]++;
	}
      }
    }else{
      for(int i=-1;i<=1;i++){
	for(int j=-1;j<=1;j++){
	  int ny=y+i;
	  int nx=x+j;
	  if(0<=ny&&ny<10&&0<=nx&&nx<10){
	    paper[ny][nx]++;
	  }
	}
      }
      if(s==3){
	for(int i=0;i<4;i++){
	  int ny=y+dy[i]*2;
	  int nx=x+dx[i]*2;
	  if(0<=ny&&ny<10&&0<=nx&&nx<10){
	    paper[ny][nx]++;
	  }
	}
      }
    }
  }
  cout<<count(paper[0],paper[0]+100,0)<<endl<<*max_element(paper[0],paper[0]+100)<<endl;
  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int k[10][10]={0};
  int x,y,s;
  int w=0,d=0;
  char c;
  int X[]={0,1, 0,-1,1, 1,-1,-1,2,0,-2, 0};
  int Y[]={1,0,-1, 0,1,-1, 1,-1,0,2, 0,-2};
  int S[]={0,4,8,12};
  while(cin>>x>>c>>y>>c>>s){
    // cout<<x<<y<<s<<endl;
    k[x][y]++;
    for(int i=0;i<S[s];i++){
      k[x+X[i]][y+Y[i]]++;
    }
  }
  for(int i=0;i<10;i++){
    for(int j=0;j<10;j++){
      if(k[i][j]==0){
	w++;
      }
      if(k[i][j]>d){
	d=k[i][j];
      }
    }
  }
  cout<<w<<'\n'<<d<<endl;
  return 0;
}

C++: 
import java.util.Scanner;

public class Main {
 static int     max   = 0;
 static int     count = 100;
 static int[][] p     = new int[10][10];

 public static void main(String[] args) {
	Scanner in = new Scanner(System.in)
	  .useDelimiter("[^0-9]+");
	max = 0;
	count = 100;
	for (int i = 0; i < p.length; i++) {
	 for (int j = 0; j < p[i].length; j++) {
		p[i][j] = 0;
	 }
	}
	while (in.hasNextLine()) {
	 ink(in.nextInt(), in.nextInt(), in.nextInt());
	}
	System.out.println(count);
	System.out.println(max);

 }

 static void ink(int x, int y, final int size) {
	if (size >= 3) {
	 pi(x + 2, y);
	 pi(x - 2, y);
	 pi(x, y + 2);
	 pi(x, y - 2);
	}
	if (size >= 2) {
	 pi(x + 1, y + 1);
	 pi(x + 1, y - 1);
	 pi(x - 1, y + 1);
	 pi(x - 1, y - 1);
	}
	if (size >= 1) {
	 pi(x + 1, y);
	 pi(x - 1, y);
	 pi(x, y + 1);
	 pi(x, y - 1);
	}
	pi(x, y);
 }

 static void pi(int x, int y) {
	if (0 <= x && x < 10 && 0 <= y && y < 10) {
	 if (p[x][y] == 0) {
		count--;
	 }
	 p[x][y]++;
	 max = Math.max(max, p[x][y]);
	}
 }
}

C++: #include<iostream>
#include<stdio.h>
#include<math.h>
#include<vector>
using namespace std;
int main() {
	int i,j,k,l,m,n,o,x,y,z;
	int max = 0;
	int count = 0;
	vector<vector<int>> s;
	s.resize(10);
	for (i = 0; i < 14; i++) {
		s[i].resize(14);
	}
	for (j = 0; j < 14; j++) {
		for (k = 0; k < 14; k++) {
			s[j][k] = 0;
		}
	}
	while (scanf("%d,%d,%d", &x, &y, &z)) {
		if (z == 1) {
			s[x + 2][y + 2] += 1;
			s[x + 1][y + 2] += 1;
			s[x + 3][y + 2] += 1;
			s[x + 2][y + 1] += 1;
			s[x + 2][y + 3] += 1;
		}
		else if (z == 2) {
			for (l = x + 1; l <= x + 3; l++) {
				for (m = y + 1; m <= y + 3; m++) {
					s[l][m] += 1;
				}
			}
		}
		else if (z == 3) {
			for (l = x + 1; l <= x + 3; l++) {
				for (m = y + 1; m <= y + 3; m++) {
					s[l][m] += 1;
					s[x][y + 2] += 1;
					s[x + 4][y + 2] += 1;
					s[x + 2][y] += 1;
					s[x + 2][y + 4] += 1;
				}
			}
		}
	}
	for (n = 2; n < 12; n++) {
		for (o = 2; o < 12; o++) {
			if (max < s[n][o]) {
				max = s[n][o];
			}
			if (s[n][o] == 0) {
				count += 1;
			}
		}
	}
	cout << count << endl;
	cout << max << endl;
	return 0;
}