from collections import defaultdict



H, W, N = list(map(int, input().split()))

YX = [list(map(int, input().split())) for _ in range(N)]



memo = defaultdict(int)

for y, x in YX:

    y -= 1; x -= 1

    for i in range(9):

        memo[y - 1 + i//3, x - 1 + i%3] += 1



ans = [0] * 10

for y, x in memo:

    if 0 < x < W-1 and 0 < y < H-1:

        ans[memo[y, x]] += 1

ans[0] = (H - 2) * (W - 2) - sum(ans)

print((*ans))
from collections import defaultdict



縦, 横, _, *点 = list(map(int, open(0).read().split()))



あー = defaultdict(int)

for y, x in zip(*[iter(点)]*2):

    y -= 1; x -= 1

    for i in range(9):

        あー[y - 1 + i//3, x - 1 + i%3] += 1



答 = [0] * 10

for [y, x], c in list(あー.items()):

    答[c] += 横 - 1 > x > 0 < y < 縦 - 1

答[0] = (縦 - 2) * (横 - 2) - sum(答)

print((*答))
from collections import defaultdict

H, W, N = list(map(int, input().split()))
YX = [list(map(int, input().split())) for _ in range(N)]
memo = defaultdict(int)
for y, x in YX:
    y -= 1
    x -= 1
    for i in range(9):
        memo[y - 1 + i // 3, x - 1 + i % 3] += 1
ans = [0] * 10
for y, x in memo:
    if 0 < x < W - 1 and 0 < y < H - 1:
        ans[memo[y, x]] += 1
ans[0] = (H - 2) * (W - 2) - sum(ans)
print((*ans))

from collections import defaultdict

縦, 横, _, *点 = list(map(int, open(0).read().split()))
あー = defaultdict(int)
for y, x in zip(*[iter(点)] * 2):
    y -= 1
    x -= 1
    for i in range(9):
        あー[y - 1 + i // 3, x - 1 + i % 3] += 1
答 = [0] * 10
for [y, x], c in list(あー.items()):
    答[c] += 横 - 1 > x > 0 < y < 縦 - 1
答[0] = (縦 - 2) * (横 - 2) - sum(答)
print((*答))

-H, W, N = list(map(int, input().split())) -YX = [list(map(int, input().split())) for _ in range(N)] -memo = defaultdict(int) -for y, x in YX: +縦, 横, _, *点 = list(map(int, open(0).read().split())) +あー = defaultdict(int) +for y, x in zip(*[iter(点)] * 2): -        memo[y - 1 + i // 3, x - 1 + i % 3] += 1 -ans = [0] * 10 -for y, x in memo: -    if 0 < x < W - 1 and 0 < y < H - 1: -        ans[memo[y, x]] += 1 -ans[0] = (H - 2) * (W - 2) - sum(ans) -print((*ans)) +        あー[y - 1 + i // 3, x - 1 + i % 3] += 1 +答 = [0] * 10 +for [y, x], c in list(あー.items()): +    答[c] += 横 - 1 > x > 0 < y < 縦 - 1 +答[0] = (縦 - 2) * (横 - 2) - sum(答) +print((*答))