'''
考场答案,可做参考
'''
n = int(input())
l = [list(map(int,input().split())) for i in range(n)]
lj_l = []
for i in l:
if [i[0], i[1]+1] in l and [i[0], i[1]-1] in l and [i[0] + 1, i[1]] in l and [i[0]-1, i[1]] in l:
lj_l.append(i)
d = {
0:0, 1:0, 2:0, 3:0, 4:0}
for i in lj_l:
s = set([(i[0]+1, i[1]+1),(i[0]+1,i[1]-1),(i[0]-1,i[1]+1),(i[0]-1,i[1]-1)])
d[len(s & set(map(tuple, l)))] += 1
for i in d.values():
print(i)