n =int(input())# 已查明的垃圾点个数
I =[0]*n # 垃圾点的坐标集合
H =[]# 回收站坐标
C =[]# 得分集合for i inrange(n):
I[i]=list(map(int,input().split()))for i inrange(n):
x=I[i][0]
y=I[i][1]if[x+1,y]in I and[x,y+1]in I and[x-1,y]in I and[x,y-1]in I:
H.extend([I[i]])for h in H:
count =0# 得分初始为0
x = h[0]
y = h[1]if[x+1,y+1]in I:
count +=1if[x+1,y-1]in I:
count +=1if[x-1,y-1]in I:
count +=1if[x-1,y+1]in I:
count +=1
C.extend([count])print(C.count(0))print(C.count(1))print(C.count(2))print(C.count(3))print(C.count(4))