#include<bits/stdc++.h>usingnamespace std;
set<pair<int,int>> st;// 存储垃圾点的坐标intmain(){// 输入数据int n;int x, y;
cin>>n;for(int i =0; i < n;++i){
cin>>x>>y;
st.emplace(x, y);}// 统计回收站坐标int dx[4]={0,0,-1,1};int dy[4]={-1,1,0,0};int vx[4]={1,1,-1,-1};int vy[4]={1,-1,1,-1};int ans[5]={0};for(auto point : st){
x = point.first;
y = point.second;int flag =true;for(int j =0; j <4;++j){int xx = x + dx[j];int yy = y + dy[j];if(st.find({xx, yy})== st.end()){
flag =false;break;}}if(flag){int score =0;for(int i =0; i <4;++i){int xx = x + vx[i];int yy = y + vy[i];if(st.find({xx, yy})!= st.end()){
score++;}}
ans[score]++;}}for(int i =0; i <5;++i){printf("%d\n", ans[i]);}return0;}