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 <string>
using namespace std;




int main()
{
	int area[14][14] = {0};
	int x,nx,ny,y,size;
	int count = 0;
	int max = 0;
	char ch1,ch2;
	while(cin >> x >>ch1>> y >>ch2>> size){
		nx=x+2;
		ny=y+2;
		switch (size){
		case 3:
			area[nx-2][ny]++;
			area[nx+2][ny]++;
			area[nx][ny-2]++;
			area[nx][ny+2]++;
		case 2:
			area[nx-1][ny-1]++;
			area[nx+1][ny-1]++;
			area[nx-1][ny+1]++;
			area[nx+1][ny+1]++;
		case 1:
			area[nx-1][ny]++;
			area[nx+1][ny]++;
			area[nx][ny-1]++;
			area[nx][ny+1]++;
		}
		area[nx][ny]++;
	}

	for (int i=2;i<12;i++){
		for (int j=2;j<12;j++){
			if (area[i][j]==0){
				count++;
			}
			if(max<area[i][j]){
				max=area[i][j];
			}
		}
	}
	
	cout << count <<endl;
	cout << max << endl;


	return 0;
}

C++: #include <iostream>
#include <algorithm>
 
using namespace std;
 
int main(void){
 
  int p[14][14] = {0};
  int x,y,size;
  char ten,tenten;
 back:;
  while( cin >> x >> ten >> y >> tenten >> size ){
    x += 2;
    y += 2;
    switch(size){
    case 3:
      p[x-2][y]++;
      p[x+2][y]++;
      p[x][y-2]++;
      p[x][y+2]++;
    case 2:
      p[x+1][y+1]++;
      p[x-1][y-1]++;
      p[x+1][y-1]++;
      p[x-1][y+1]++;
    case 1:
      p[x][y+1]++;
      p[x][y-1]++;
      p[x-1][y]++;
      p[x+1][y]++;
      p[x][y]++;
    }
  }
   
  int cnt = 0;
  int m = 0;
  for( int i = 2 ; i < 12 ; i++ ){
    for( int j = 2 ; j < 12 ; j++ ){
      if( p[i][j] == 0 ) cnt++;
      m = max( m , p[i][j] );
      //  cout << " " << p[i][j] << " ";
    }
    //cout << endl;
  }
  cout << cnt << endl << m << endl;
  return 0;
}

C++: #include<stdio.h>
#include<string.h>
#include<iostream>

using namespace std;

void big(int a[10][10],int x,int y);
void mid(int a[10][10],int x,int y);
void sma(int a[10][10],int x,int y);

int main(){
	int a[10][10]={0};
	int s,x,y;
	char c;
	while(cin>>x>>c>>y>>c>>s){
		if(s==1){
			sma(a,x,y);
		}
		if(s==2){
			mid(a,x,y);
		}
		if(s==3){
			big(a,x,y);
		}
		for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
//		cout<<a[i][j];
		}
//		cout<<endl;
	}
//	cout<<endl<<x<<y<<s<<endl;
//	cout<<endl;
	}
	int max=0;
	int cnt=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(a[i][j]==0)cnt++;
			if(a[i][j]>max)max=a[i][j];
		}
	}
	cout<<cnt<<endl;
	cout<<max<<endl;
	
}


void big(int a[10][10],int x,int y){
	mid(a,x,y);
	a[x+2][y]++;
	a[x-2][y]++;
	a[x][y+2]++;
	a[x][y-2]++;
}
void mid(int a[10][10],int x,int y){
	sma(a,x,y);
	a[x+1][y+1]++;
	a[x+1][y-1]++;
	a[x-1][y+1]++;
	a[x-1][y-1]++;
}
void sma(int a[10][10],int x,int y){
	a[x][y]++;
	a[x+1][y]++;
	a[x-1][y]++;
	a[x][y+1]++;
	a[x][y-1]++;
}