#include<iostream>
#include<cstring>
#include<cstdio>
#include<climits>
using namespace std;
const int maxn=20000,inf=INT_MAX;
inline const void read(int &a)
{
a=0;
char c=getchar();
while(c<'0'||c>'9')c=getchar();
while(c>='0'&&c<='9')
{
a=a*10+c-'0';
c=getchar();
}
}
int n,p[maxn],x[maxn],y[maxn],range;
int ans[maxn][maxn],num[maxn];
int main()
{
memset(ans,0,sizeof(ans));
memset(num,0,sizeof(num));
read(n);
for(int i=1;i<=n;i++)
{
read(x[i]);read(y[i]);
range=max(range,max(x[i],y[i]));
ans[x[i]][y[i]]++;
}
for(int i=1;i<=range;i++)
for(int j=1;j<=range;j++)
ans[i][j]=ans[i][j]+ans[i-1][j]+ans[i][j-1]-ans[i-1][j-1];
for(int i=1;i<=n;i++)num[ans[x[i]][y[i]]-1]++;
for(int i=0;i<=n-1;i++)printf("%d\n",num[i]);
return 0;
}