"""
1.x、y为整数
2.(x,y)上下左右均有垃圾
满足上述两个条件后根据(x,y)4个角上的垃圾数进行评分(最多4分)
"""
'''
测试用例
7
1 2
2 1
0 0
1 1
1 0
2 0
0 1
'''
n = int(input())
L = []
scoreList = [0]*5
for i in range(n):
(x,y) = map(str, input().split())
# 需要判断是否为整数
if '.' not in x and '.' not in y:
x = int(x)
y = int(y)
L.append((x,y))
for (x,y) in L:
if (x-1, y) in L and (x+1, y) in L and (x, y-1) in L and (x,y+1) in L:
score = 0
if (x-1,y-1) in L:
score += 1
if (x-1,y+1) in L:
score += 1
if (x+1,y-1) in L:
score += 1
if (x+1,y+1) in L:
score += 1
scoreList[score] += 1
for i in range(5):
print(scoreList[i])
满分程序!