#include<iostream>
#include<cstdio>
using namespace std;
const int maxx=100500;
int m=150000,ans[maxx],c[maxx],n;
struct data
{
int x,y;
}a[maxx];
int bow(int x)
{
return x&(-x);
}
void update(int x,int y)
{
while(x<=m)
{
c[x]+=y;
x+=bow(x);
}
return;
}
int sum(int x)
{
int ans=0;
while(x>0)
{
ans+=c[x];
x-=bow(x);
}
return ans;
}
int main()
{
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>a[i].x>>a[i].y;
}
for(int i=1;i<=n;i++)
{
int t=a[i].x+1;//防止树状数组内数据出现0
update(t,1);
int v=sum(t);//确定等级
ans[v]++;
}
for(int i=1;i<=n;i++)
cout<<ans[i]<<endl;
return 0;
}