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
                }
        }
}

Python: #!/usr/bin/python

paper = [[0] * 10 for i in range(10)]

def small(x, y):
    p = [[x, y]]
    for i, j in zip([-1, 0, 1, 0], [0, -1, 0, 1]):
        p.append([x + i, y + j])
    return p

def middle(x, y):
    p = small(x, y)
    for i, j in zip([1, -1, 1, -1], [1, 1, -1, -1]):
        p.append([x + i, y + j])
    return p

def big(x, y):
    p = middle(x, y)
    for i, j in zip([-2, 0, 2, 0], [0, -2, 0, 2]):
        p.append([x + i, y + j])
    return p

while True:
    try:
        x, y, size = map(int, input().split(','))
    except:
        break

    if size == 1:
        bp = small(x, y)
    elif size == 2:
        bp = middle(x, y)
    elif size == 3:
        bp = big(x, y)
    for p in bp:
        if 0 <= p[0] < 10 and 0 <= p[1] < 10:
            paper[p[1]][p[0]] += 1

print(sum(paper[y][x] == 0 for y in range(10) for x in range(10)))
print(max(paper[y][x] for y in range(10) for x in range(10)))

Python: import sys

lines = []
for line in sys.stdin:
    lines.append(line.strip().split(','))

field = [[0 for i in range(10)] for j in range(10)]

def drop(x, y, z):
    if z==1:
        for i in range(-1,2):
            for j in range(-1,2):
                if abs(i)+abs(j)<2 and 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1
    elif z==2:
        for i in range(-1,2):
            for j in range(-1,2):
                if 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1
    else:
        for i in range(-2,3):
            for j in range(-2,3):
                if abs(i)+abs(j)<3 and 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1



for line in lines:
    x,y,z = map(int, line)
    #drop(x,y,z)

n = 0
m = 0
for f in field:
    for e in f:
        if e > m:
            m = e
        if e==0:
            n+=1

print(n)
print(m)

Python: import sys

paper = [[0] * 10 for i in range(10)]

for line in sys.stdin:
    x,y,s = map(int,line.split(','))
    for i in range(10):
        for j in range(10):
            if s == 1:
                if abs(i - y) + abs(j - x) <= 1:
                    paper [i] [j] += 1
            if s == 2:
                if abs(i - y) <= 1 and abs(j - x) <= 1:
                    paper [i] [j] += 1
            if s == 3:
                if abs(i - y) + abs(j - x) <= 2:
                    paper [i] [j] += 1

ans = [0,0]
for i in range(10):
    for j in range(10):
        if paper [i] [j] == 0:
            ans [0] += 1
        if paper [i] [j] > ans [1]:
            ans [1] = paper [i] [j]

print(ans [0],ans [1])

Python: paper = [[0 for i in range(15)] for j in range(15)]
base = 2
 
while True:
    try:
        x, y, s = list(map(int, input().split(',')))
    except EOFError:
        break
         
    x += 2
    y += 2
    if s == 3:
        paper[x-2][y] += 1
        paper[x+2][y] += 1
        paper[x][y-2] += 1
        paper[x][y+2] += 1
 
    if s >= 2:
        paper[x-1][y-1] += 1
        paper[x-1][y+1] += 1
        paper[x+1][y-1] += 1
        paper[x+1][y+1] += 1
 
    paper[x][y] += 1
    paper[x-1][y] += 1
    paper[x+1][y] += 1
    paper[x][y-1] += 1
    paper[x][y+1] += 1
 
cnt = max = 0;
for x in range(2, 12):
    for y in range(2, 12):
        if paper[x][y] == 0:
            cnt += 1
        if paper[x][y] > max:
            max = paper[x][y]
 
print(cnt, max, sep='\n')

Python: a = [[0] * 14 for _ in range(14)]
while True:
    try:
        x, y, s = map(int, input().split(','))
    except:
        break
    x += 2
    y += 2
    for d in [(0, 0), (0, -1), (0, 1), (-1, 0), (1, 0)]:
        a[x + d[0]][y + d[1]] += 1
    if s >= 2:
        for d in [(1, 1), (1, -1), (-1, 1), (-1, -1)]:
            a[x + d[0]][y + d[1]] += 1
    if s == 3:
        for d in [(0, 2), (0, -2), (2, 0), (-2, 0)]:
            a[x + d[0]][y + d[1]] += 1
print(sum(a[i][2:12].count(0) for i in range(2, 12)))
print(max(max(a[i][2:12]) for i in range(2, 12)))

Python: import sys

lines = []
for line in sys.stdin:
    lines.append(line.strip().split(','))

field = [[0 for i in range(10)] for j in range(10)]

def drop(x, y, z):
    if z==1:
        for i in range(-1,2):
            for j in range(-1,2):
                if abs(i)+abs(j)<2 and 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1
    elif z==2:
        for i in range(-1,2):
            for j in range(-1,2):
                if 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1
    else:
        for i in range(-2,3):
            for j in range(-2,3):
                if abs(i)+abs(j)<3 and 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1

drop(1,1,1)

Python: A=[[int(0) for i in range(10)]for j in range(10)]
count=0
while 1:
    try:
        x,y,s = map(int, input().split(','))
        if s==1:
            for i in range(x-1,x+2):
                if i>=0 and i<=9:
                    A[i][y]=A[i][y]+1
            for i in range(y-1,y+2):
                if i>=0 and i<=9:
                    A[x][i]=A[x][i]+1
            A[x][y]=A[x][y]-1 
        elif s==2:
            for i in range(x-1,x+2):
                for j in range(y-1,y+2):
                    if i>=0 and i<=9 and j>=0 and j<=9:
                        A[i][j]=A[i][j]+1
        else:
            for i in range(x-2,x+3):
                if i>=0 and i<=9:
                    A[i][y]=A[i][y]+1
            for i in range(y-2,y+3):
                if i>=0 and i<=9:
                    A[x][i]=A[x][i]+1
            for i in range(x-1,x+2):
                if i>=0 and i<=9:
                    A[i][y]=A[i][y]-1
            for i in range(y-1,y+2):
                if i>=0 and i<=9:
                    A[x][i]=A[x][i]-1
            for i in range(x-1,x+2):
                for j in range(y-1,y+2):
                    if i>=0 and i<=9 and j>=0 and j<=9:
                        A[i][j]=A[i][j]+1
    except:
        break
num=0
for i in range(10):
    for j in range(10):
        if A[i][j]==0:
            count=count+1
        if A[i][j]!=0:
            if num<A[i][j]:
                num=A[i][j]
print(count)
print(num)