'''
是否可以是回收站:
1、该处有垃圾
2、其上下左右有垃圾
对选址评分:对角有几处有垃圾就有几分
求 每种得分的选址数
'''
n = int(input()) # n处垃圾
laji = []
zero = 0
one = 0
two = 0
three = 0
four = 0
for i in range(n):
x, y = map(int, input().split())
laji.append((x, y))
for l in laji:
x = l[0]
y = l[1]
score = 0
if (x,y+1) in laji and (x,y-1) in laji and (x+1,y) in laji and (x-1,y) in laji: # 是回收站
if (x+1,y+1) in laji:
score += 1
if (x+1,y-1) in laji:
score += 1
if (x-1,y+1) in laji:
score += 1
if (x-1,y-1) in laji:
score += 1
if score == 0:
zero += 1
if score == 1:
one += 1
if score == 2:
two += 1
if score == 3:
three += 1
if score == 4:
four += 1
print(zero)
print(one)
print(two)
print(three)
print(four)
11-29
342
09-08
162