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: paper=[[-float('inf')]*14]*2+[[-float('inf')]*2+[0]*10+[-float('inf')]*2 for _ in xrange(10)]+[[-float('inf')]*14]*2
while 1:
    try:
        x,y,size=map(int,raw_input().split(","))
        x+=2
        y+=2
        paper[x][y]+=1
        paper[x+1][y]+=1
        paper[x-1][y]+=1
        paper[x][y+1]+=1
        paper[x][y-1]+=1
        if size>=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
            if size==3:
                paper[x+2][y]+=1
                paper[x-2][y]+=1
                paper[x][y+2]+=1
                paper[x][y-2]+=1
    except:
        break
ct0=0
maxpaper=0
for i in xrange(14):
    for j in xrange(14):
        if paper[i][j]==0:
            ct0+=1
        if maxpaper<paper[i][j]:
            maxpaper=paper[i][j]
print(ct0)
print(maxpaper)

Python: t = [[0 for i in range(10)] for j in range(10)]
case1 = [(0, 0), (0, -1), (1, 0), (0, 1), (-1, 0)]
case2 = [(1, -1), (1, 1), (-1, 1), (-1, -1)]
case3 = [(0, -2), (2, 0), (0, 2), (-2, 0)]
while True:
    try:
        x, y, s = map(int, input().split(','))
    except:
        break
    for c in [case1, case2, case3][:s]:
        for _x, _y in c:
            if y+_y < 0 or x+_x < 0:
                continue
            try:
                t[y+_y][x+_x] += 1
            except IndexError:
                continue

print(sum(1 for l in t for v in l if not v))
print(max(v for l in t for v in l))

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]) for i in range(14)))
print(a)

Python: paper = [0 for i in range(100)]
white_points = None
deep_points = None

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:
        print(paper.count(0))
        print(max(paper))
        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 not 0 <= p[1] * 10 + p[0] <= 99: continue
        paper[p[1] * 10 + p[0]] += 1

Python: import sys
mat=[[0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0]]
c=0
max=0

for line in sys.stdin.readlines():

    y, x, s=map(int,line.split(','))
    if(s==1):
        mat[x][y]=mat[x][y]+1
        mat[x][y+1]=mat[x][y+1]+1
        mat[x-1][y]=mat[x-1][y]+1
        mat[x][y-1]=mat[x][y-1]+1
        mat[x+1][y]=mat[x+1][y]+1
    elif(s==2):
        mat[x][y]=mat[x][y]+1
        mat[x][y+1]=mat[x][y+1]+1
        mat[x-1][y]=mat[x-1][y]+1
        mat[x][y-1]=mat[x][y-1]+1
        mat[x+1][y]=mat[x+1][y]+1
        mat[x-1][y+1]=mat[x-1][y+1]+1
        mat[x-1][y-1]=mat[x-1][y-1]+1
        mat[x+1][y+1]=mat[x+1][y+1]+1
        mat[x+1][y-1]=mat[x+1][y-1]+1
    elif(s==3):
        mat[x][y]=mat[x][y]+1
        mat[x][y+1]=mat[x][y+1]+1
        mat[x-1][y]=mat[x-1][y]+1
        mat[x][y-1]=mat[x][y-1]+1
        mat[x+1][y]=mat[x+1][y]+1
        mat[x-1][y+1]=mat[x-1][y+1]+1
        mat[x-1][y-1]=mat[x-1][y-1]+1
        mat[x+1][y+1]=mat[x+1][y+1]+1
        mat[x+1][y-1]=mat[x+1][y-1]+1
        mat[x-2][y]=mat[x-2][y]+1
        mat[x+2][y]=mat[x+2][y]+1
        mat[x][y+2]=mat[x][y+2]+1
        mat[x][y-2]=mat[x][y-2]+1
for i in range(10):
    for j in range(10):
        if(mat[i][j]==0):
            c=c+1
        if(mat[i][j]>max):
            max=mat[i][j]
print(c)
print(max)

Python: paper = [0 for i in range(100)]
white_points = None
deep_points = None

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:
        print(paper.count(0))
        print(max(paper))
        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 not 0 <= p[0] * 10 + p[1] <= 99: continue
        paper[p[1] * 10 + p[0]] += 1