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 <iostream>
#include <algorithm>

using namespace std;

int main()
{
	int hani[14][14] = { 0 }, x, y, size;
	int white = 0, max_num = 0;
	char tmp;

	while ( cin >> x >> tmp >> y >> tmp >> size )
	{
		x = x + 2;
		y = y + 2;
		if ( size == 1 )
		{
			hani[x][y] = hani[x][y] + 1;
			hani[x-1][y] = hani[x-1][y] + 1;
			hani[x+1][y] = hani[x+1][y] + 1;
			hani[x][y-1] = hani[x][y-1] + 1;
			hani[x][y+1] = hani[x][y+1] + 1;
		}
		else if ( size == 2 )
		{
			hani[x][y] = hani[x][y] + 1;
			hani[x-1][y] = hani[x-1][y] + 1;
			hani[x+1][y] = hani[x+1][y] + 1;
			hani[x][y-1] = hani[x][y-1] + 1;
			hani[x][y+1] = hani[x][y+1] + 1;
			
			hani[x-1][y-1] = hani[x-1][y-1] + 1;
			hani[x+1][y-1] = hani[x+1][y-1] + 1;
			hani[x-1][y+1] = hani[x-1][y+1] + 1;
			hani[x+1][y+1] = hani[x+1][y+1] + 1;
		}
		else if ( size == 3 )
		{
			hani[x][y] = hani[x][y] + 1;
			hani[x-1][y] = hani[x-1][y] + 1;
			hani[x+1][y] = hani[x+1][y] + 1;
			hani[x][y-1] = hani[x][y-1] + 1;
			hani[x][y+1] = hani[x][y+1] + 1;
			
			hani[x-1][y-1] = hani[x-1][y-1] + 1;
			hani[x+1][y-1] = hani[x+1][y-1] + 1;
			hani[x-1][y+1] = hani[x-1][y+1] + 1;
			hani[x+1][y+1] = hani[x+1][y+1] + 1;

			hani[x-2][y] = hani[x-2][y] + 1;
			hani[x][y-2] = hani[x][y-2] + 1;
			hani[x+2][y] = hani[x+2][y] + 1;
			hani[x][y+2] = hani[x][y+2] + 1;
		}
	}

	for ( int i = 2 ; i < 12 ; i = i + 1 )
	{
		for ( int j = 2 ; j < 12 ; j = j + 1 )
		{
			if ( hani[i][j] == 0 )
			{
				white = white + 1;
			}
			max_num = max( max_num, hani[i][j] );
		}
	}

	cout << white << endl;
	cout << max_num << endl;

	return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int i,j,k,paper[10][10]={0},x,y,n,c=0,max=0;
	
	for(k=0;k<5;k++){
		scanf("%d,%d,%d",&x,&y,&n);
		if(n==1){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
		if(n==2){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y-1>=0 && x-1>=0)paper[y-1][x-1]++;
			if(y-1>=0 && x+1<10)paper[y-1][x+1]++;
			if(y+1<10 && x-1>=0)paper[y+1][x-1]++;
			if(y+1<10 && x+1<10)paper[y+1][x+1]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
		if(n==3){
			if(y-1>=0)paper[y-1][x]++;
			if(y+1<10)paper[y+1][x]++;
			if(x-1>=0)paper[y][x-1]++;
			if(x+1<10)paper[y][x+1]++;
			if(y-1>=0 && x-1>=0)paper[y-1][x-1]++;
			if(y-1>=0 && x+1<10)paper[y-1][x+1]++;
			if(y+1<10 && x-1>=0)paper[y+1][x-1]++;
			if(y+1<10 && x+1<10)paper[y+1][x+1]++;
			
			if(y-2>=0)paper[y-2][x]++;
			if(y+2<10)paper[y+2][x]++;
			if(x+2<10)paper[y][x+2]++;
			if(x-2>=0)paper[y][x-2]++;
			if(y>=0 && y<10 && x>=0 && x<10)paper[y][x]++;
		}
	}
	for(i=0;i<10;i++){
		for(j=0;j<10;j++){
			printf("%d ",paper[i][j]);
		}
		puts("");
	}
	printf("%d\n%d\n",c,max);
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(void){
	int val;
	while(cin >> val)
		cerr << val << endl;

	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

int mp[10][10];

int main(){
  int x,y,s;
  while(~scanf("%d,%d,%d",x,y,s)){
    if(s==1){
      // small
      mp[x][y]++;
      if(x-1>=0) mp[x-1][y]++;
      if(x+1<=9) mp[x+1][y]++;
      if(y-1>=0) mp[x][y-1]++;
      if(y+1>=0) mp[x][y+1]++;
    }else if(s==2){
      // mid
      FOR(i,max(0,x-1),min(9,x+1)+1){
        FOR(j,max(0,y-1),min(9,y+1)+1){
          mp[i][j]++;
        }
      }
    }else{
      // big
      FOR(i,max(0,x-1),min(9,x+1)+1){
        FOR(j,max(0,y-1),min(9,y+1)+1){
          mp[i][j]++;
        }
      }
      if(x-2>=0) mp[x-2][y]++;
      if(x+2<=9) mp[x+2][y]++;
      if(y-2>=0) mp[x][y-2]++;
      if(y+2>=0) mp[x][y+2]++;
    }
  }
  int cnt = 0;
  int mx = 0;
  REP(i,10)REP(j,10){
    if(mp[i][j]==0)++cnt;
    else mx=max(mx,mp[i][j]);
  }
  cout<<cnt<<endl;
  cout<<mx<<endl;
  return 0;
}