Invitation

아직 제출이 없습니다시간 제한3초메모리 제한1024 MB

문제

Iris works for the host of the 2022 ICPC Taoyuan Regional Contest. Due to COVID-19, the ICPC regional contests in Taiwan could not invite any leader to the opening ceremony in the past few years. The host of the 2022 ICPC Taoyuan Regional Contest is eager to invite leaders in Taoyuan City to attend the opening ceremony.

There are nn leaders numbered from 11 to nn in Taoyuan City, and Iris’s task is to invite some leaders to attend the ceremony. Leader ii is available from time slot _iℓ\_i to time slot r_ir\_i. If Iris wants to invite kk leaders a_1,a_2,,a_ka\_1, a\_2, \dots ,a\_k, then all of them must have a common available time slot. It means that Iris has to find a time slot xx such that _a_ixr_a_iℓ\_{a\_i} ≤ x ≤ r\_{a\_i} for 1ik1 ≤ i ≤ k.

Iris is curious about the number of combinations of kk leaders available at the same time? You need to give the answers for all kk between 11 and nn. The combinations may be extremely numerous, please output the number of combinations modulo 998244353998244353.

입력

The first line of input contains one integer nn, the number of leaders. The following nn lines indicate the leaders’ available time slots. The ii-th line of these nn lines contains two numbers _iℓ\_i and r_ir\_i. The ii-th leader is available at time _iℓ\_i to r_ir\_i.

출력

Print nn numbers. The kk-th number is the number of combinations of kk leaders having a common available time slot. Please modulo the answer with 998244353998244353.

제한

  • 1n1000001 ≤ n ≤ 100000
  • 0_ir_i10000000000 ≤ ℓ\_i ≤ r\_i ≤ 1000000000 for 1in1 ≤ i ≤ n.