import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int[][] nn = new int[n][2]; int[] score = {0,0,0,0,0}; for (int i = 0; i < n; i++) { nn[i][0] = scanner.nextInt(); nn[i][1] = scanner.nextInt(); } for (int i = 0; i < n; i++) { int k = 0; int sum = 0; for (int j = 0; j < n; j++) { if (nn[i][0] == nn[j][0]){ if (nn[i][1] == (nn[j][1]-1)||nn[i][1] == (nn[j][1]+1)) k++; } if (nn[i][1] == nn[j][1]){ if (nn[i][0] == (nn[j][0]-1)||nn[i][0] == (nn[j][0]+1)) k++; } } if (k == 4){ for (int j = 0; j < n; j++) { if((nn[j][0] == (nn[i][0]+1))&&((nn[j][1] == (nn[i][1]+1))||(nn[j][1] == (nn[i][1]-1)))) sum++; if((nn[j][0] == (nn[i][0]-1))&&((nn[j][1] == (nn[i][1]+1))||(nn[j][1] == (nn[i][1]-1)))) sum++; } score[sum]++; } } for (int a : score) System.out.println(a); } }