from collections import Counter

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

src = [tuple(map(int,input().split())) for i in range(N)]



blacks = Counter()

for y,x in src:

    for i in range(-1,2):

        if not 0 <= y+i < H: continue

        for j in range(-1,2):

            if not 0 <= x+j < W: continue

            blacks[(x+j, y+i)] += 1



ans = [0] * 10

for (x,y),v in blacks.items():

    if x<2 or y<2: continue

    ans[v] += 1

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

print(*ans,sep='\n')

import sys

input = sys.stdin.readline

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

AB = [tuple(map(int,input().split())) for i in range(N)]

from collections import defaultdict

dic = defaultdict(lambda: 0)

for y,x in AB:

    for dx in range(-1,2):

        for dy in range(-1,2):

            nx,ny = x+dx,y+dy

            if not 1 <= nx <= W: continue

            if not 1 <= ny <= H: continue

            dic[(nx,ny)] += 1



ans = [0] * 10

for (x,y),c in dic.items():

    if x==1 or x==W or y==1 or y==H: continue

    ans[c] += 1

s = sum(ans)

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



print(*ans, sep='\n')

from collections import Counter

H, W, N = map(int, input().split())
src = [tuple(map(int, input().split())) for i in range(N)]
blacks = Counter()
for y, x in src:
    for i in range(-1, 2):
        if not 0 <= y + i < H:
            continue
        for j in range(-1, 2):
            if not 0 <= x + j < W:
                continue
            blacks[(x + j, y + i)] += 1
ans = [0] * 10
for (x, y), v in blacks.items():
    if x < 2 or y < 2:
        continue
    ans[v] += 1
ans[0] = (H - 2) * (W - 2) - sum(ans[1:])
print(*ans, sep="\n")

import sys

input = sys.stdin.readline
H, W, N = map(int, input().split())
AB = [tuple(map(int, input().split())) for i in range(N)]
from collections import defaultdict

dic = defaultdict(lambda: 0)
for y, x in AB:
    for dx in range(-1, 2):
        for dy in range(-1, 2):
            nx, ny = x + dx, y + dy
            if not 1 <= nx <= W:
                continue
            if not 1 <= ny <= H:
                continue
            dic[(nx, ny)] += 1
ans = [0] * 10
for (x, y), c in dic.items():
    if x == 1 or x == W or y == 1 or y == H:
        continue
    ans[c] += 1
s = sum(ans)
ans[0] = (W - 2) * (H - 2) - s
print(*ans, sep="\n")

-from collections import Counter +import sys +input = sys.stdin.readline -src = [tuple(map(int, input().split())) for i in range(N)] -blacks = Counter() -for y, x in src: -    for i in range(-1, 2): -        if not 0 <= y + i < H: -            continue -        for j in range(-1, 2): -            if not 0 <= x + j < W: +AB = [tuple(map(int, input().split())) for i in range(N)] +from collections import defaultdict + +dic = defaultdict(lambda: 0) +for y, x in AB: +    for dx in range(-1, 2): +        for dy in range(-1, 2): +            nx, ny = x + dx, y + dy +            if not 1 <= nx <= W: -            blacks[(x + j, y + i)] += 1 +            if not 1 <= ny <= H: +                continue +            dic[(nx, ny)] += 1 -for (x, y), v in blacks.items(): -    if x < 2 or y < 2: +for (x, y), c in dic.items(): +    if x == 1 or x == W or y == 1 or y == H: -    ans[v] += 1 -ans[0] = (H - 2) * (W - 2) - sum(ans[1:]) +    ans[c] += 1 +s = sum(ans) +ans[0] = (W - 2) * (H - 2) - s