#codefestivalchinaf. [code_festival_china_f]Yakiniku

[code_festival_china_f]Yakiniku

Problem

There's a Japanese dish called 'Yakiniku', which is very similar to barbecue. You roast some pieces of meat on a grill to cook 'Yakiniku'.

You have a grill that can roast any number of pieces of meat on it at once. You want to make NN pieces of 'Yakiniku' using that grill.

'Yakiniku' is a very tender dish that the ii-th piece of meat must be put on the grill at the time sis_i, and must be picked up at the time tit_i sharp. If you pick the piece of meat later than tit_i that piece is 'scorched'. If you pick the piece of meat earlier than tit_i that piece is 'underdone'.

However, when you pick the ii-th piece of meat at the time tit_i, you totally forget where you put the ii-th piece of meat on, so you pick 11 piece of meat from the grill at random. Calculate the probability of each piece of meat picked up 'underdone' and 'scorched'.


Input

Input is given in the following format.

NN s1s_1 t1t_1 s2s_2 t2t_2 : sNs_N tNt_N

  • On the first line, you will be given the integer N(1leqNleq100,000)N (1 \\leq N \\leq 100,000), the number of pieces of meat you are going to cook 'Yakiniku'.
  • Following NN lines consists of two integers si,ti(0leqsi<tileq109)s_i,t_i (0 \\leq s_i < t_i \\leq 10^9), the time you put the ii-th meat on the grill and the time you have to pick up that meat from the grill. s1,s2,...,sN,t1,t2,...,tNs_1,s_2,...,s_N,t_1,t_2,...,t_N are distinct from each other.

Output

Output NN lines. The ii-th (1leqileqN)(1 \\leq i \\leq N) line should contain the probability of ii-th piece of meat picked up from the grill 'underdone' and 'scorched' separated by space. Your answer is considered correct if it has an absolute or relative error less than 10710^{-7}.


Input Example 1


2
1 3
2 4

Output Example 1


0.0 0.5
0.5 0.0

Think of the 11st piece of meat. At the time 33 there are 22 pieces of meat on the grill. You pick the 22nd piece of meat with probability 1/21/2 and in that case at the time 44 the 11st meat will be picked up 'scorched'.

Think of the 22nd piece of meat. At the time 33 the 22nd piece of meat is taken from the grill with probability 1/21/2 and is 'underdone'.


Input Example 2


5
1 2
3 4
5 10
6 9
7 8

Output Example 2


0.0000000000 0.0000000000
0.0000000000 0.0000000000
0.6666666667 0.0000000000
0.3333333333 0.3333333333
0.0000000000 0.6666666667

Input Example 3


1
0 1000000000

Output Example 3


0 0