from collections import Counter as C;H,W,N,*L=list(map(int,open(0).read().split()));K=[];M=[(H-2)*(W-2)]+[0]*9

for a,b in zip(*[iter(L)]*2):

	for c in range(9):

		x=b-c//3;y=a-c%3

		if H-1>y>0<x<W-1:K+=[y*W+x]

for k,v in list(C(list(C(K).values())).items()):M[0]-=v;M[k]+=v

print((*M))
from collections import Counter as C;r=list(range(3))

def s():

	H,W,N,*L=list(map(int,open(0).read().split()));D={};M=[(H-2)*(W-2)]+[0]*9

	for a,b in zip(*[iter(L)]*2):

		for x in r:

			for y in r:

				if H-1>a-y>0<b-x<W-1:

					t=(a-y)*W+b-x

					D[t]=D.get(t,0)+1

	for k,v in list(C(list(D.values())).items()):M[0]-=v;M[k]+=v

	print((*M))

if __name__=="__main__":s()
from collections import Counter as C

H, W, N, *L = list(map(int, open(0).read().split()))
K = []
M = [(H - 2) * (W - 2)] + [0] * 9
for a, b in zip(*[iter(L)] * 2):
    for c in range(9):
        x = b - c // 3
        y = a - c % 3
        if H - 1 > y > 0 < x < W - 1:
            K += [y * W + x]
for k, v in list(C(list(C(K).values())).items()):
    M[0] -= v
    M[k] += v
print((*M))

from collections import Counter as C

r = list(range(3))


def s():
    H, W, N, *L = list(map(int, open(0).read().split()))
    D = {}
    M = [(H - 2) * (W - 2)] + [0] * 9
    for a, b in zip(*[iter(L)] * 2):
        for x in r:
            for y in r:
                if H - 1 > a - y > 0 < b - x < W - 1:
                    t = (a - y) * W + b - x
                    D[t] = D.get(t, 0) + 1
    for k, v in list(C(list(D.values())).items()):
        M[0] -= v
        M[k] += v
    print((*M))


if __name__ == "__main__":
    s()

-H, W, N, *L = list(map(int, open(0).read().split())) -K = [] -M = [(H - 2) * (W - 2)] + [0] * 9 -for a, b in zip(*[iter(L)] * 2): -    for c in range(9): -        x = b - c // 3 -        y = a - c % 3 -        if H - 1 > y > 0 < x < W - 1: -            K += [y * W + x] -for k, v in list(C(list(C(K).values())).items()): -    M[0] -= v -    M[k] += v -print((*M)) +r = list(range(3)) + + +def s(): +    H, W, N, *L = list(map(int, open(0).read().split())) +    D = {} +    M = [(H - 2) * (W - 2)] + [0] * 9 +    for a, b in zip(*[iter(L)] * 2): +        for x in r: +            for y in r: +                if H - 1 > a - y > 0 < b - x < W - 1: +                    t = (a - y) * W + b - x +                    D[t] = D.get(t, 0) + 1 +    for k, v in list(C(list(D.values())).items()): +        M[0] -= v +        M[k] += v +    print((*M)) + + +if __name__ == "__main__": +    s()