#include <iostream>
#include <string>
using namespace std;
#define SIZE 320010
int tree[SIZE];
int level[SIZE];
int max_size;
int lowBit( int index ){
return index & ( -index );
}
void update( int index, const int& val ){
while( index <= SIZE ){
tree[index] += val;
index += lowBit( index );
}
}
int getSum( int index ){
int sum = 0;
while( index >= 1 ){
sum += tree[index];
index -= lowBit( index );
}
return sum;
}
int main(){
int x, y;
memset( tree, 0, sizeof( tree ) );
memset( level, 0, sizeof( level ) );
cin >> max_size;
for( int i = 1; i <= max_size; ++i ){
cin >> x >> y;
x++;
level[getSum( x )]++;
update( x, 1 );
}
for( int j = 0; j < max_size; ++j )
cout << level[j] << endl;
return 0;
}