#ABC221D. [ABC221D] Online games

[ABC221D] Online games

Score : 400400 points

Problem Statement

There is an online game with NN registered players. Today, which is the 1010010^{100}-th day since its launch, the developer Takahashi examined the users' login history. It turned out that the ii-th player logged in for BiB_i consecutive days from Day AiA_i, where Day 11 is the launch day, and did not log in for the other days. In other words, the ii-th player logged in on Day AiA_i, Ai+1A_i+1, \ldots, Ai+Bi1A_i+B_i-1, and only on those days. For each integer kk such that 1kN1\leq k\leq N, find the number of days on which exactly kk players logged in.

Constraints

  • 1N2×1051 \leq N \leq 2\times 10^5
  • 1Ai1091 \leq A_i \leq 10^9
  • 1Bi1091 \leq B_i \leq 10^9
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN

A1A_1 B1B_1

A2A_2 B2B_2

::

ANA_N BNB_N

Output

Print NN integers with spaces in between, as follows:

D1D_1 D2D_2 \cdots DND_N

Here, DiD_i denotes the number of days on which exactly kk players logged in.

3
1 2
2 3
3 1
2 2 0

The first player logged in on Day 11, 22, the second player logged in on Day 22, 33, 44, and the third player logged in on Day 33 only.

Thus, we can see that Day 11, 44 had 11 player logged in, Day 22, 33 had 22 players logged in, and the other days had no players logged in.

The answer is: there were 22 days with exactly 11 player logged in, 22 days with exactly 22 players logged in, and 00 days with exactly 33 players logged in.

2
1000000000 1000000000
1000000000 1000000000
0 1000000000

There may be two or more players who logged in during the same period.