Buggy python submission (verdict: Runtime Error):
import sys

drops = [None,
         [(-1,0),(1,0),(0,-1),(0,1)],
         [(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1)],
         [(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1),(-2,0),(2,0),(0,-2),(0,2)]]

B = [[0 for j in xrange(10)] for i in xrange(10)]

for line in sys.stdin:
    x, y, s = map(int, line.rstrip().split(','))
    for dx, dy in drops[s]:
        nx, ny = x+dx, y+dy
        if (0 <= nx <= 9 or 0 <= ny <= 9):
            B[ny][nx] += 1

emp, m = 0, 0
for i in xrange(10):
    for j in xrange(10):
        if B[i][j] == 0:
            emp += 1
        m = max(m, B[i][j])
print emp
print m

Fixed submission:
import sys

drops = [None,
         [(0,0),(-1,0),(1,0),(0,-1),(0,1)],
         [(0,0),(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1)],
         [(0,0),(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1),(-2,0),(2,0),(0,-2),(0,2)]]

B = [[0 for j in xrange(10)] for i in xrange(10)]

for line in sys.stdin:
    x, y, s = map(int, line.rstrip().split(','))
    for dx, dy in drops[s]:
        nx, ny = x+dx, y+dy
        if (0 <= nx <= 9 and 0 <= ny <= 9):
            B[ny][nx] += 1

emp, m = 0, 0
for i in xrange(10):
    for j in xrange(10):
        if B[i][j] == 0:
            emp += 1
        m = max(m, B[i][j])
print emp
print m

Buggy python submission (verdict: Runtime Error):
import sys

drops = [None,
         [(-1,0),(1,0),(0,-1),(0,1)],
         [(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1)],
         [(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1),(-2,0),(2,0),(0,-2),(0,2)]]

B = [[0 for j in xrange(10)] for i in xrange(10)]

for line in sys.stdin:
    x, y, s = map(int, line.rstrip().split(','))
    B[x][y] += 1
    for dx, dy in drops[s]:
        nx, ny = x+dx, y+dy
        if (0 <= nx <= 9 or 0 <= ny <= 9):
            B[ny][nx] += 1

emp, m = 0, 0
for i in xrange(10):
    for j in xrange(10):
        if B[i][j] == 0:
            emp += 1
        m = max(m, B[i][j])
print emp
print m

Fixed submission:
import sys

drops = [None,
         [(0,0),(-1,0),(1,0),(0,-1),(0,1)],
         [(0,0),(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1)],
         [(0,0),(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1),(-2,0),(2,0),(0,-2),(0,2)]]

B = [[0 for j in xrange(10)] for i in xrange(10)]

for line in sys.stdin:
    x, y, s = map(int, line.rstrip().split(','))
    for dx, dy in drops[s]:
        nx, ny = x+dx, y+dy
        if (0 <= nx <= 9 and 0 <= ny <= 9):
            B[ny][nx] += 1

emp, m = 0, 0
for i in xrange(10):
    for j in xrange(10):
        if B[i][j] == 0:
            emp += 1
        m = max(m, B[i][j])
print emp
print m

Buggy python submission (verdict: Runtime Error):
import sys

drops = [None,
         [(0,0),(-1,0),(1,0),(0,-1),(0,1)],
         [(0,0),(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1)],
         [(0,0),(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1),(-2,0),(2,0),(0,-2),(0,2)]]

B = [[0 for j in xrange(10)] for i in xrange(10)]

for line in sys.stdin:
    x, y, s = map(int, line.rstrip().split(','))
    for dx, dy in drops[s]:
        nx, ny = x+dx, y+dy
        if (0 <= nx <= 9 or 0 <= ny <= 9):
            B[ny][nx] += 1

emp, m = 0, 0
for i in xrange(10):
    for j in xrange(10):
        if B[i][j] == 0:
            emp += 1
        m = max(m, B[i][j])
print emp
print m

Fixed submission:
import sys

drops = [None,
         [(0,0),(-1,0),(1,0),(0,-1),(0,1)],
         [(0,0),(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1)],
         [(0,0),(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1),(-2,0),(2,0),(0,-2),(0,2)]]

B = [[0 for j in xrange(10)] for i in xrange(10)]

for line in sys.stdin:
    x, y, s = map(int, line.rstrip().split(','))
    for dx, dy in drops[s]:
        nx, ny = x+dx, y+dy
        if (0 <= nx <= 9 and 0 <= ny <= 9):
            B[ny][nx] += 1

emp, m = 0, 0
for i in xrange(10):
    for j in xrange(10):
        if B[i][j] == 0:
            emp += 1
        m = max(m, B[i][j])
print emp
print m