//============================================================================
// Name : POJ_2352.cpp
// Author : tiger
// Version :
// Copyright : 树状数组
// Description : Hello World in C++, Ansi-style
//============================================================================
#include<iostream>
#include<cstdio>
using namespace std;
int in[150002];
int cnt[150002];
const int n=32010;
//树状数组
//求最小幂2^k:
int Lowbit(int t)
{
return t & ( t ^ ( t - 1 ) );
}
//求前n项和:
int Sum(int end)
{
int sum = 0;
while(end > 0)
{
sum += in[end];
end -= Lowbit(end);
}
return sum;
}
//对某个元素进行加法操作:
void Plus(int pos , int num)
{
while(pos <= n)
{
in[pos] += num;
pos += Lowbit(pos);
}
}
int main()
{
freopen("in","r",stdin);
int t,i;
scanf("%d",&t);
int x,y;
for( i=0;i<t;i++)
{
scanf("%d%d",&x,&y);
cnt[Sum(x+1)]++;
Plus(x+1,1);
}
for(i=0;i<t;i++)
printf("%d/n",cnt[i]);
return 0;
}