#include
<
iostream
>
#define
MAXN 15000
#define
MAX 32002
using
namespace
std;
int
STAR[MAX]
=
{
0
};
int
LEV[MAXN]
=
{
0
};
int
lowbit(
int
n)
{
return
n
&
(
-
n);
}
int
sum(
int
n)
{
int
r
=
0
;
while
(n
!=
0
)
{
r
+=
STAR[n];
n
-=
lowbit(n);
}
return
r;
}
void
update(
int
n)
{
while
(n
<
MAX)
{
STAR[n]
++
;
n
+=
lowbit(n);
}
}
int
main()
{
int
n, x, y, i;
scanf(
"
%d
"
,
&
n);
for
(i
=
0
; i
<
n; i
++
)
{
scanf(
"
%d %d
"
,
&
x,
&
y);
LEV[sum(x
+
1
)]
++
;
update(x
+
1
);
}
for
(i
=
0
; i
<
n; i
++
)
printf(
"
%d\n
"
, LEV[i]);
return
0
;
}