import java.util.Scanner;
import java.util.ArrayList;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
ArrayList<Integer> l1=new ArrayList<>();
ArrayList<Integer> l2=new ArrayList<>();
for(int i=0;i<n;i++){
l1.add(sc.nextInt());
l2.add(sc.nextInt());
}
int[] hei=new int[5];
for(int i=0;i<n;i++){
int a=l1.get(i);
int b=l2.get(i);
int c1=0;
int c2=0;
for (int j=0;j<n;j++){
if((l1.get(j)==a+1)&&(l2.get(j)==b)){
c1++;
}
if((l1.get(j)==a-1)&&(l2.get(j)==b)){
c1++;
}
if((l1.get(j)==a)&&(l2.get(j)==b+1)){
c1++;
}
if((l1.get(j)==a)&&(l2.get(j)==b-1)){
c1++;
}
}
if(c1==4){
for(int j=0;j<n;j++){
if((l1.get(j)==a+1)&&(l2.get(j)==b+1)){
c2++;
}
if((l1.get(j)==a+1)&&(l2.get(j)==b-1)){
c2++;
}
if((l1.get(j)==a-1)&&(l2.get(j)==b+1)){
c2++;
}
if((l1.get(j)==a-1)&&(l2.get(j)==b-1)){
c2++;
}
}
hei[c2]++;
}
}
for(int i=0;i<5;i++){
System.out.println(hei[i]);
}
}
}
//测试数据:
/*
7
1 2
2 1
1 1
0 0
1 0
2 0
0 1
11
9 10
10 10
11 10
12 10
13 10
11 9
11 8
12 9
10 9
10 11
12 11
*/
//用ArrayList 不用考虑最大范围。