#include<iostream>
#include<algorithm>
#include<cstring>
#include<map>
//使用map而非unordered_map
//因为unordered_map和set都不能直接存储pair类型的变量
using namespace std;
typedef pair<int,int> PII;
const int N = 1010;
int n;
int x,y;
map<PII,int> mp;
PII a[N];
int st[N];
int f(int x,int y)
{
int dx[] = {0,1,0,-1},dy[] = {1,0,-1,0};
int cnt1 = 0;
for(int i = 0; i<4; i++)
{
int x1 = x+dx[i],y1 = y+dy[i];
if(mp.count({x1,y1})) cnt1++;
}
int zx[] = {-1,-1,1,1},zy[] = {-1,1,-1,1};
int cnt2 = 0;
for(int i = 0; i<4; i++)
{
int x2 = x+zx[i],y2 = y+zy[i];
if(mp.count({x2,y2})) cnt2++;
}
if(cnt1==4) return cnt2;
return -1;
}
int main()
{
cin>>n;
for(int i = 1; i<=n; i++)
{
cin>>x>>y;
a[i] = {x,y};
mp[{x,y}] = 1;
}
for(int i = 1; i<=n; i++)
{
int score = f(a[i].first,a[i].second);
if(score!=-1)//合法
{
st[score]++;
}
}
for(int i = 0; i<5; i++) cout<<st[i]<<endl;
return 0;
}