Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.buffer.readline

from collections import defaultdict

def getlist():
	return list(map(int, input().split()))

H, W, N = getlist()
D = defaultdict(int)
D[0] += (H - 2) * (W - 2)
L = []
for i in range(N):
	a, b = getlist()
	for j in range(3):
		for k in range(3):
			if H - 2 >= a - j and a - j >= 1 and W - 2 >= b - k and b - k >= 1:
				L.append((a - j, b - k))

L = sorted(L)
n = len(L)
if n != 0:
	v = L[0]
c = 0
for i in range(n):
	if v == L[i]:
		c += 1
	else:
		D[c] += 1
		c = 1
	v = L[i]

if n != 0:
	D[c] += 1
for i in range(1, 10):
	D[0] -= D[i]

for i in range(10):
	print(D[i])

Fixed submission:
import sys
input = sys.stdin.buffer.readline

from collections import defaultdict

def getlist():
	return list(map(int, input().split()))

H, W, N = getlist()
D = defaultdict(int)
D[0] += (H - 2) * (W - 2)
L = []
for i in range(N):
	a, b = getlist()
	for j in range(3):
		for k in range(3):
			if H - 2 >= a - j and a - j >= 1 and W - 2 >= b - k and b - k >= 1:
				L.append((a - j, b - k))

L = sorted(L)
n = len(L)
if n != 0:
	v = L[0]
c = 0
for i in range(n):
	if v == L[i]:
		c += 1
	else:
		D[c] += 1
		c = 1
	v = L[i]

if n != 0:
	D[c] += 1
for i in range(1, 10):
	D[0] -= D[i]

for i in range(10):
	print(D[i])

Buggy python submission (verdict: Time Limit Exceeded):
from collections import defaultdict

def getlist():
	return list(map(int, input().split()))

H, W, N = getlist()
D = defaultdict(int)
D[0] += (H - 2) * (W - 2)
L = []
for i in range(N):
	a, b = getlist()
	for j in range(3):
		for k in range(3):
			if H - 2 >= a - j and a - j >= 1 and W - 2 >= b - k and b - k >= 1:
				L.append([a - j, b - k])

L = sorted(L)
n = len(L)
if n != 0:
	v = L[0]
c = 0
for i in range(n):
	if v == L[i]:
		c += 1
	else:
		D[c] += 1
		c = 1
	v = L[i]

if n != 0:
	D[c] += 1
for i in range(1, 10):
	D[0] -= D[i]

for i in range(10):
	print(D[i])

Fixed submission:
import sys
input = sys.stdin.buffer.readline

from collections import defaultdict

def getlist():
	return list(map(int, input().split()))

H, W, N = getlist()
D = defaultdict(int)
D[0] += (H - 2) * (W - 2)
L = []
for i in range(N):
	a, b = getlist()
	for j in range(3):
		for k in range(3):
			if H - 2 >= a - j and a - j >= 1 and W - 2 >= b - k and b - k >= 1:
				L.append((a - j, b - k))

L = sorted(L)
n = len(L)
if n != 0:
	v = L[0]
c = 0
for i in range(n):
	if v == L[i]:
		c += 1
	else:
		D[c] += 1
		c = 1
	v = L[i]

if n != 0:
	D[c] += 1
for i in range(1, 10):
	D[0] -= D[i]

for i in range(10):
	print(D[i])

Buggy python submission (verdict: Runtime Error):
def getlist():
	return list(map(int, input().split()))

H, W, N = getlist()
ans = [0] * 10
ans[0] = (H - 2) * (W - 2)
L = []
for i in range(N):
	a, b = getlist()
	for j in range(3):
		for k in range(3):
			if H - 2 >= a - j and a - j >= 1 and W - 2 >= b - k and b - k >= 1:
				L.append([a - j, b - k])

L = sorted(L)
n = len(L)
v = L[0]
c = 0
for i in range(n):
	if v == L[i]:
		c += 1
	else:
		ans[c] += 1
		c = 1
	v = L[i]
ans[c] += 1

for i in range(1, 10):
	ans[0] -= ans[i]

for i in range(10):
	print(ans[i])

Fixed submission:
import sys
input = sys.stdin.buffer.readline

from collections import defaultdict

def getlist():
	return list(map(int, input().split()))

H, W, N = getlist()
D = defaultdict(int)
D[0] += (H - 2) * (W - 2)
L = []
for i in range(N):
	a, b = getlist()
	for j in range(3):
		for k in range(3):
			if H - 2 >= a - j and a - j >= 1 and W - 2 >= b - k and b - k >= 1:
				L.append((a - j, b - k))

L = sorted(L)
n = len(L)
if n != 0:
	v = L[0]
c = 0
for i in range(n):
	if v == L[i]:
		c += 1
	else:
		D[c] += 1
		c = 1
	v = L[i]

if n != 0:
	D[c] += 1
for i in range(1, 10):
	D[0] -= D[i]

for i in range(10):
	print(D[i])

Buggy python submission (verdict: Runtime Error):
from fractions import gcd

def getlist():
	return list(map(int, input().split()))

H, W, N = getlist()
ans = [0] * 10
ans[0] = (H - 2) * (W - 2)
L = []
for i in range(N):
	a, b = getlist()
	for j in range(3):
		for k in range(3):
			if H - 2 >= a - j and a - j >= 1 and W - 2 >= b - k and b - k >= 1:
				L.append([a - j, b - k])

L = sorted(L)
n = len(L)
v = L[0]
c = 0
for i in range(n):
	if v == L[i]:
		c += 1
	else:
		ans[c] += 1
		c = 1
	v = L[i]
ans[c] += 1

for i in range(1, 10):
	ans[0] -= ans[i]
print(ans)

Fixed submission:
import sys
input = sys.stdin.buffer.readline

from collections import defaultdict

def getlist():
	return list(map(int, input().split()))

H, W, N = getlist()
D = defaultdict(int)
D[0] += (H - 2) * (W - 2)
L = []
for i in range(N):
	a, b = getlist()
	for j in range(3):
		for k in range(3):
			if H - 2 >= a - j and a - j >= 1 and W - 2 >= b - k and b - k >= 1:
				L.append((a - j, b - k))

L = sorted(L)
n = len(L)
if n != 0:
	v = L[0]
c = 0
for i in range(n):
	if v == L[i]:
		c += 1
	else:
		D[c] += 1
		c = 1
	v = L[i]

if n != 0:
	D[c] += 1
for i in range(1, 10):
	D[0] -= D[i]

for i in range(10):
	print(D[i])