Buggy python submission (verdict: Time Limit Exceeded):
dx = [-1,-1,-1,0,0,1,1,1,0]
dy = [-1,0,1,-1,1,-1,0,1,0]
H,W,N = map(int,input().split())
s = []
d = {}
for i in range(N):
    a,b = map(int,input().split())
    for j in range(9):
        A = a + dy[j]
        B = b + dx[j]
        f = 0
        if 2 <= A <= H-1:
            if 2 <= B <= W-1:
                f = 1
        if f == 1:
            if (A,B) not in s:
                d[(A,B)] = 0
                s.append((A,B))
            d[(A,B)] += 1
ans = [(H-2)*(W-2)-len(s),0,0,0,0,0,0,0,0,0]
for (x,y) in s:
    ans[d[(x,y)]] += 1
for i in range(10):
    print(ans[i])

Fixed submission:
dx = [-1,-1,-1,0,0,1,1,1,0]
dy = [-1,0,1,-1,1,-1,0,1,0]
H,W,N = map(int,input().split())
from collections import defaultdict, Counter
d = defaultdict(int)
for i in range(N):
    a,b = map(int,input().split())
    for j in range(9):
        A = a + dy[j]
        B = b + dx[j]
        f = 0
        if 2 <= A <= H-1:
            if 2 <= B <= W-1:
                f = 1
        if f == 1:
            d[(A,B)] += 1
s = 0
c = Counter(d.values())
for i in range(1,10):
    s += c[i]
c[0] = (H-2)*(W-2) - s
for i in range(10):
    print(c[i])

Buggy python submission (verdict: Time Limit Exceeded):
dx = [-1,-1,-1,0,0,1,1,1,0]
dy = [-1,0,1,-1,1,-1,0,1,0]
H,W,N = map(int,input().split())
s = []
d = {}
for i in range(N):
    a,b = map(int,input().split())
    for j in range(9):
        A = a + dy[j]
        B = b + dx[j]
        if A <= 1:
            continue
        if A >= H:
            continue
        if B <= 1:
            continue
        if B >= W:
            continue
        if (A,B) not in s:
            d[(A,B)] = 0
            s.append((A,B))
        d[(A,B)] += 1
ans = [(H-2)*(W-2)-len(s),0,0,0,0,0,0,0,0,0]
for (x,y) in s:
    ans[d[(x,y)]] += 1
for i in range(10):
    print(ans[i])

Fixed submission:
dx = [-1,-1,-1,0,0,1,1,1,0]
dy = [-1,0,1,-1,1,-1,0,1,0]
H,W,N = map(int,input().split())
from collections import defaultdict, Counter
d = defaultdict(int)
for i in range(N):
    a,b = map(int,input().split())
    for j in range(9):
        A = a + dy[j]
        B = b + dx[j]
        f = 0
        if 2 <= A <= H-1:
            if 2 <= B <= W-1:
                f = 1
        if f == 1:
            d[(A,B)] += 1
s = 0
c = Counter(d.values())
for i in range(1,10):
    s += c[i]
c[0] = (H-2)*(W-2) - s
for i in range(10):
    print(c[i])

Buggy python submission (verdict: Time Limit Exceeded):
dx = [-1,-1,-1,0,0,1,1,1,0]
dy = [-1,0,1,-1,1,-1,0,1,0]
H,W,N = map(int,input().split())
s = []
d = {}
for i in range(N):
    a,b = map(int,input().split())
    for j in range(9):
        A = a + dy[j]
        B = b + dx[j]
        if A <= 1:
            continue
        if A >= H:
            continue
        if B <= 1:
            continue
        if B >= W:
            continue
        if (A,B) not in s:
            d[(A,B)] = 0
            s.append((A,B))
        d[(A,B)] += 1
ans = [(H-2)*(W-2)-len(s),0,0,0,0,0,0,0,0,0]
for (x,y) in s:
    ans[d[(x,y)]] += 1
for i in range(10):
    print(ans[i])

Fixed submission:
dx = [-1,-1,-1,0,0,1,1,1,0]
dy = [-1,0,1,-1,1,-1,0,1,0]
H,W,N = map(int,input().split())
from collections import defaultdict, Counter
d = defaultdict(int)
for i in range(N):
    a,b = map(int,input().split())
    for j in range(9):
        A = a + dy[j]
        B = b + dx[j]
        f = 0
        if 2 <= A <= H-1:
            if 2 <= B <= W-1:
                f = 1
        if f == 1:
            d[(A,B)] += 1
s = 0
c = Counter(d.values())
for i in range(1,10):
    s += c[i]
c[0] = (H-2)*(W-2) - s
for i in range(10):
    print(c[i])

Buggy python submission (verdict: Time Limit Exceeded):
dx = [-1,-1,-1,0,0,1,1,1]
dy = [-1,0,1,-1,1,-1,0,1]
H,W,N = map(int,input().split())
s = []
d = {}
for i in range(N):
    a,b = map(int,input().split())
    f = 1
    if b <= 1:
        f = 0
    if b >= W:
        f = 0
    if a <= 1:
        f = 0
    if a >= H:
        f = 0
    if f == 1:
        if (a,b) not in s:
            d[(a,b)] = 0
            s.append((a,b))
        d[(a,b)] += 1
    for j in range(8):
        A = a + dy[j]
        B = b + dx[j]
        if A <= 1:
            continue
        if A >= H:
            continue
        if B <= 1:
            continue
        if B >= W:
            continue
        if (A,B) not in s:
            d[(A,B)] = 0
            s.append((A,B))
        d[(A,B)] += 1
ans = [(H-2)*(W-2)-len(s),0,0,0,0,0,0,0,0,0]
for (x,y) in s:
    ans[d[(x,y)]] += 1
for i in range(10):
    print(ans[i])

Fixed submission:
dx = [-1,-1,-1,0,0,1,1,1,0]
dy = [-1,0,1,-1,1,-1,0,1,0]
H,W,N = map(int,input().split())
from collections import defaultdict, Counter
d = defaultdict(int)
for i in range(N):
    a,b = map(int,input().split())
    for j in range(9):
        A = a + dy[j]
        B = b + dx[j]
        f = 0
        if 2 <= A <= H-1:
            if 2 <= B <= W-1:
                f = 1
        if f == 1:
            d[(A,B)] += 1
s = 0
c = Counter(d.values())
for i in range(1,10):
    s += c[i]
c[0] = (H-2)*(W-2) - s
for i in range(10):
    print(c[i])

Buggy python submission (verdict: Runtime Error):
dx = [-1,-1,-1,0,0,1,1,1]
dy = [-1,0,1,-1,1,-1,0,1]
H,W,N = map(int,input().split())
s = []
d = {}
for i in range(N):
    x,y = map(int,input().split())
    if (x,y) not in s:
        d[(x,y)] = 0
        s.append((x,y))
    d[(x,y)] += 1
    for j in range(8):
        X = x + dx[j]
        Y = y + dx[j]
        if (X,Y) not in s:
            d[(x,y)] = 0
            s.append((X,Y))
        d[(X,Y)] += 1
ans = [H*W-len(s),0,0,0,0,0,0,0,0,0]
for (x,y) in s:
    ans[d[(x,y)]] += 1
for i in range(10):
    print(ans[i])

Fixed submission:
dx = [-1,-1,-1,0,0,1,1,1,0]
dy = [-1,0,1,-1,1,-1,0,1,0]
H,W,N = map(int,input().split())
from collections import defaultdict, Counter
d = defaultdict(int)
for i in range(N):
    a,b = map(int,input().split())
    for j in range(9):
        A = a + dy[j]
        B = b + dx[j]
        f = 0
        if 2 <= A <= H-1:
            if 2 <= B <= W-1:
                f = 1
        if f == 1:
            d[(A,B)] += 1
s = 0
c = Counter(d.values())
for i in range(1,10):
    s += c[i]
c[0] = (H-2)*(W-2) - s
for i in range(10):
    print(c[i])