The first line of the input contains one integer q (1 ≤ q ≤ 500 000) — the number of queries. Then, q lines follow. The i-th of them contains two integers typei and vi (1 ≤ typei ≤ 2). If typei = 1 then vi denotes a parent of a new vertex, while if typei = 2 then you should print the answer for a subtree rooted in vi. It's guaranteed that there will be at least 1 query of the second type, that is, the output won't be empty. It's guaranteed that just before the i-th query a vertex vi already exists.

NoteBelow, you can see the drawing for the first sample. Red circles denote queries of the second type.

For each query of the second type print one real number —the expected value of the penalty if Limak attacks the given subtree. Your answer will be considered correct if its absolute or relative error does not exceed 10 - 6. Namely: let's assume that your answer is a, and the answer of the jury is b. The checker program will consider your answer correct if .

Limak is a little grizzly bear. He will once attack Deerland but now he can only destroy trees in role-playing games. Limak starts with a tree with one vertex. The only vertex has index 1 and is a root of the tree.Sometimes, a game chooses a subtree and allows Limak to attack it. When a subtree is attacked then each of its edges is destroyed with probability , independently of other edges. Then, Limak gets the penalty — an integer equal to the height of the subtree after the attack. The height is defined as the maximum number of edges on the path between the root of the subtree and any vertex in the subtree.You must handle queries of two types.  1 v denotes a query of the first type. A new vertex appears and its parent is v. A new vertex has the next available index (so, new vertices will be numbered 2, 3, ...).  2 v denotes a query of the second type. For a moment let's assume that the game allows Limak to attack a subtree rooted in v. Then, what would be the expected value of the penalty Limak gets after the attack? In a query of the second type, Limak doesn't actually attack the subtree and thus the query doesn't affect next queries.

Input:
7
1 1
1 1
2 1
1 2
1 3
2 2
2 1

Output:
0.7500000000
0.5000000000
1.1875000000

Output:
0.75000000
0.50000000
1.18750000

Input:
8
2 1
1 1
1 2
1 3
1 4
2 1
1 4
2 1

Output:
0.0000000000
0.9375000000
0.9687500000

Output:
0.00000000
0.93750000
0.96875000

Input:
10
2 1
2 1
1 1
1 1
1 2
2 2
2 2
2 2
1 4
2 4

Output:
0.0000000000
0.0000000000
0.5000000000
0.5000000000
0.5000000000
0.5000000000

Output:
0.00000000
0.00000000
0.50000000
0.50000000
0.50000000
0.50000000

Input:
20
1 1
1 2
1 2
2 4
2 1
1 2
1 5
2 1
1 6
1 1
1 6
2 1
1 2
2 3
1 6
1 6
2 4
2 1
2 5
2 6

Output:
0.00000000
0.87500000
1.06250000
1.40625000
0.00000000
0.00000000
1.46093750
0.96875000
0.93750000

Output:
0.0000000000
0.8750000000
1.0625000000
1.4062500000
0.0000000000
0.0000000000
1.4609375000
0.9687500000
0.9375000000

Input:
50
1 1
1 1
2 1
2 2
2 3
2 2
2 2
1 1
2 3
2 4
1 3
2 1
1 1
2 5
1 3
2 3
1 5
2 2
1 7
1 2
2 6
2 5
1 7
2 10
2 7
1 5
1 2
1 8
1 5
1 8
2 7
2 7
1 4
1 11
1 10
2 4
2 5
2 18
1 10
2 17
2 5
2 13
1 4
2 12
2 5
1 13
2 10
2 1
2 22
2 5

Output:
0.7500000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
1.1250000000
0.0000000000
0.7500000000
0.0000000000
0.0000000000
0.5000000000
0.0000000000
0.7500000000
0.7500000000
0.7500000000
0.5000000000
1.2500000000
0.0000000000
0.0000000000
1.2500000000
0.0000000000
0.0000000000
1.2500000000
0.7500000000
2.3416137695
0.0000000000
1.2500000000

Output:
0.75000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
1.12500000
0.00000000
0.75000000
0.00000000
0.00000000
0.50000000
0.00000000
0.75000000
0.75000000
0.75000000
0.50000000
1.25000000
0.00000000
0.00000000
1.25000000
0.00000000
0.00000000
1.25000000
0.75000000
2.34161377
0.00000000
1.25000000

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 ...

Output: 1.00000000

Output: 1.0000000000

Input:
500000
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1
2 1
1 1...

Output:
0.5000000000
0.7500000000
0.8750000000
0.9375000000
0.9687500000
0.9843750000
0.9921875000
0.9960937500
0.9980468750
0.9990234375
0.9995117188
0.9997558594
0.9998779297
0.9999389648
0.9999694824
0.9999847412
0.9999923706
0.9999961853
0.9999980927
0.9999990463
0.9999995232
0.9999997616
0.9999998808
0.9999999404
0.9999999702
0.9999999851
0.9999999925
0.9999999963
0.9999999981
0.9999999991
0.9999999995
0.9999999998
0.9999999999
0.9999999999
1.0000000000
1.0000000000
1.00000...

Output:
0.50000000
0.75000000
0.87500000
0.93750000
0.96875000
0.98437500
0.99218750
0.99609375
0.99804688
0.99902344
0.99951172
0.99975586
0.99987793
0.99993896
0.99996948
0.99998474
0.99999237
0.99999619
0.99999809
0.99999905
0.99999952
0.99999976
0.99999988
0.99999994
0.99999997
0.99999999
0.99999999
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000...

Input:
1
2 1

Output: 0.0000000000

Output: 0.00000000

Input:
500000
1 1
2 1
1 2
2 3
1 1
1 2
1 2
1 1
2 4
1 6
2 6
2 4
2 8
1 3
1 9
2 9
1 2
2 2
1 1
1 4
2 1
1 2
1 3
2 7
2 3
1 12
2 2
2 5
1 5
2 6
2 6
1 6
1 18
1 14
2 14
1 7
2 11
2 3
2 16
1 11
2 18
1 11
1 12
2 11
2 19
1 17
1 22
2 5
1 2
2 23
1 3
2 8
1 8
2 29
1 8
1 18
1 29
2 4
1 30
1 13
1 26
1 12
2 25
2 32
1 22
1 22
1 30
1 18
1 28
2 5
2 14
1 29
1 39
2 19
1 31
1 35
1 39
2 5
1 45
1 15
1 43
1 35
2 33
2 46
1 45
2 10
1 27
1 14
1 28
2 46
2 23
...

Output:
0.50000000
0.00000000
0.00000000
0.50000000
0.00000000
0.00000000
0.50000000
1.50000000
1.82031250
0.00000000
1.00000000
1.62500000
0.00000000
0.50000000
0.50000000
0.50000000
0.00000000
1.00000000
0.00000000
0.50000000
0.75000000
0.00000000
0.75000000
0.00000000
0.00000000
0.00000000
0.50000000
0.00000000
0.00000000
0.75000000
0.50000000
0.00000000
0.75000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.50000000
0.00000000
0.00000000
1.45312...

Output:
0.5000000000
0.0000000000
0.0000000000
0.5000000000
0.0000000000
0.0000000000
0.5000000000
1.5000000000
1.8203125000
0.0000000000
1.0000000000
1.6250000000
0.0000000000
0.5000000000
0.5000000000
0.5000000000
0.0000000000
1.0000000000
0.0000000000
0.5000000000
0.7500000000
0.0000000000
0.7500000000
0.0000000000
0.0000000000
0.0000000000
0.5000000000
0.0000000000
0.0000000000
0.7500000000
0.5000000000
0.0000000000
0.7500000000
0.0000000000
0.0000000000
0.0000000000
0.00000...

Input:
500000
1 1
2 1
1 2
1 2
2 2
1 3
2 2
2 1
1 2
2 1
2 3
1 2
2 1
1 3
2 8
1 5
1 7
1 8
1 11
2 1
1 4
1 8
1 9
2 6
1 2
1 13
2 3
2 9
1 3
1 11
1 17
1 6
1 16
2 11
2 22
1 15
1 6
2 13
2 8
1 11
2 11
1 24
2 7
2 23
2 25
2 25
1 24
2 18
1 7
1 2
2 26
2 19
1 1
1 22
2 5
1 31
2 24
2 32
2 25
1 1
2 27
2 8
2 23
2 9
1 19
2 7
1 1
1 22
1 10
2 35
1 35
1 28
2 3
1 1
1 33
2 40
1 27
1 21
1 33
1 9
2 12
1 31
2 25
1 14
2 23
1 26
1 36
2 13
1 2
1 14
1 40
2...

Output:
0.50000000
0.75000000
1.00000000
1.00000000
1.06250000
0.50000000
1.09375000
0.00000000
1.37500000
0.00000000
1.51562500
0.50000000
0.75000000
0.00000000
0.75000000
1.12500000
0.87500000
0.50000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.87500000
0.75000000
0.00000000
0.00000000
0.00000000
1.18750000
0.00000000
0.75000000
0.75000000
0.00000000
1.84375000
0.00000000
0.00000000
0.00000000
0.00000000
0.75000000
1.28125000
0.00000000
0.00000...

Output:
0.5000000000
0.7500000000
1.0000000000
1.0000000000
1.0625000000
0.5000000000
1.0937500000
0.0000000000
1.3750000000
0.0000000000
1.5156250000
0.5000000000
0.7500000000
0.0000000000
0.7500000000
1.1250000000
0.8750000000
0.5000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.8750000000
0.7500000000
0.0000000000
0.0000000000
0.0000000000
1.1875000000
0.0000000000
0.7500000000
0.7500000000
0.0000000000
1.8437500000
0.0000000000
0.00000...

Input:
500000
2 1
1 1
2 2
2 1
1 2
1 1
2 3
2 3
1 1
2 1
1 3
2 5
2 4
2 2
1 4
1 7
2 1
2 3
2 2
2 4
2 5
2 3
2 2
2 1
1 4
2 5
1 8
2 9
2 10
1 8
1 5
2 5
2 2
2 5
2 1
1 8
2 12
1 7
1 1
2 1
1 15
2 9
1 1
1 2
2 17
2 13
2 4
1 14
2 19
2 18
1 10
1 6
2 6
2 11
1 9
2 6
1 16
2 18
2 6
1 14
2 8
1 19
1 24
1 7
2 9
1 2
2 17
2 18
1 16
2 19
2 18
1 2
1 1
1 28
1 15
2 23
1 20
1 24
2 24
2 33
2 11
2 7
1 35
2 33
1 36
1 23
1 36
2 25
2 1
1 7
2 2
2 1
1 32
1 3...

Output:
0.00000000
0.00000000
0.50000000
0.00000000
0.00000000
1.12500000
0.00000000
0.00000000
0.75000000
1.54687500
0.50000000
0.75000000
0.75000000
0.00000000
0.50000000
0.75000000
1.54687500
0.00000000
0.00000000
0.00000000
0.50000000
0.75000000
0.50000000
1.85156250
0.00000000
1.98437500
0.00000000
0.00000000
0.00000000
1.34375000
0.00000000
0.00000000
0.50000000
0.00000000
0.50000000
0.00000000
0.50000000
1.12500000
0.50000000
0.00000000
0.00000000
0.50000000
0.00000...

Output:
0.0000000000
0.0000000000
0.5000000000
0.0000000000
0.0000000000
1.1250000000
0.0000000000
0.0000000000
0.7500000000
1.5468750000
0.5000000000
0.7500000000
0.7500000000
0.0000000000
0.5000000000
0.7500000000
1.5468750000
0.0000000000
0.0000000000
0.0000000000
0.5000000000
0.7500000000
0.5000000000
1.8515625000
0.0000000000
1.9843750000
0.0000000000
0.0000000000
0.0000000000
1.3437500000
0.0000000000
0.0000000000
0.5000000000
0.0000000000
0.5000000000
0.0000000000
0.50000...

Input:
500000
1 1
2 1
2 1
2 1
1 1
1 1
2 4
1 4
1 4
1 6
1 7
2 7
1 7
1 7
1 9
2 11
1 11
1 11
1 11
2 11
2 11
1 11
2 15
1 15
2 11
2 9
2 15
1 15
2 17
1 17
1 17
2 19
2 19
2 19
2 19
1 19
1 20
2 17
2 19
1 21
1 21
1 23
2 24
2 23
2 24
2 24
1 11
1 24
2 23
1 26
2 24
1 27
2 28
2 28
1 28
1 27
2 28
1 28
1 31
2 24
2 31
2 31
1 31
2 33
1 33
1 34
2 35
1 35
1 36
1 33
2 37
1 37
1 39
2 27
1 40
1 41
2 37
2 40
2 37
2 36
1 40
2 33
2 42
1 42
2 26
2 44
1 4...

Output:
0.50000000
0.50000000
0.50000000
0.00000000
0.50000000
0.00000000
0.87500000
0.87500000
0.00000000
1.18750000
1.09375000
0.50000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
1.12500000
0.75000000
0.00000000
0.50000000
0.00000000
0.00000000
0.75000000
0.75000000
0.00000000
0.00000000
0.50000000
1.06250000
0.50000000
0.50000000
0.00000000
0.00000000
0.00000000
1.46679688
0.93750000
0.75000000
0.93750000
0.96875000
1.25000000
0.00000000
1.23449707
0.00000...

Output:
0.5000000000
0.5000000000
0.5000000000
0.0000000000
0.5000000000
0.0000000000
0.8750000000
0.8750000000
0.0000000000
1.1875000000
1.0937500000
0.5000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
1.1250000000
0.7500000000
0.0000000000
0.5000000000
0.0000000000
0.0000000000
0.7500000000
0.7500000000
0.0000000000
0.0000000000
0.5000000000
1.0625000000
0.5000000000
0.5000000000
0.0000000000
0.0000000000
0.0000000000
1.4667968750
0.9375000000
0.75000...

Input:
500000
1 1
2 1
2 1
1 1
2 1
1 1
1 1
1 1
1 1
2 1
2 1
1 1
1 8
2 9
2 9
1 9
2 10
2 10
1 10
1 10
1 10
2 13
2 13
2 13
1 13
2 14
2 14
2 14
1 14
2 15
1 15
1 15
2 17
2 17
2 17
2 17
2 17
2 17
2 15
1 17
2 18
2 18
1 18
1 18
1 20
2 20
2 18
2 18
1 20
1 20
1 22
2 22
2 22
1 22
1 20
2 18
2 25
2 25
2 25
1 20
2 25
1 25
1 28
2 29
2 28
2 29
1 29
2 30
2 30
2 30
2 25
1 30
1 31
1 31
2 20
2 33
2 33
1 33
2 34
1 33
1 30
2 29
2 34
2 34
1 34
1 18
2 3...

Output:
0.50000000
0.50000000
0.75000000
0.98437500
0.98437500
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.75000000
0.00000000
0.00000000
0.50000000
1.00000000
1.00000000
0.50000000
0.50000000
1.40625000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.50000000
0.00000000
0.00000000
0.00000000
0.00000000
0.87500000
1.58984...

Output:
0.5000000000
0.5000000000
0.7500000000
0.9843750000
0.9843750000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.7500000000
0.0000000000
0.0000000000
0.5000000000
1.0000000000
1.0000000000
0.5000000000
0.5000000000
1.4062500000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.50000...

Input:
500000
1 1
1 1
2 3
2 3
1 3
2 3
1 3
1 3
2 6
2 3
1 6
1 6
1 6
1 9
2 6
2 9
1 9
2 11
1 11
1 11
2 11
1 11
2 11
2 14
2 11
2 14
2 14
2 14
2 14
1 14
2 14
1 14
1 16
2 17
2 17
1 17
1 17
2 17
1 17
1 20
2 17
2 20
1 20
1 22
2 23
2 23
1 23
2 24
2 24
2 24
1 24
2 25
1 25
1 26
2 25
1 27
1 27
1 27
2 26
1 27
1 31
2 32
2 32
2 32
2 32
2 32
1 32
2 31
1 33
2 33
2 33
1 33
2 33
1 26
1 33
2 33
2 33
2 33
2 31
2 33
2 33
1 33
2 33
1 33
2 39
2 39
2 39...

Output:
0.0000000000
0.0000000000
0.5000000000
0.0000000000
0.8750000000
1.1250000000
0.5000000000
0.0000000000
0.7500000000
0.8750000000
0.0000000000
0.8750000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.5000000000
0.0000000000
0.0000000000
0.7500000000
1.1250000000
0.5000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.7500000000
0.9375000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.7500000000
0.50000...

Output:
0.00000000
0.00000000
0.50000000
0.00000000
0.87500000
1.12500000
0.50000000
0.00000000
0.75000000
0.87500000
0.00000000
0.87500000
0.00000000
0.00000000
0.00000000
0.00000000
0.50000000
0.00000000
0.00000000
0.75000000
1.12500000
0.50000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.75000000
0.93750000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.75000000
0.50000000
0.50000000
0.75000000
0.87500000
0.87500000
0.87500000
0.96875...

Input:
500000
1 1
2 2
1 2
1 2
1 4
1 5
1 6
1 6
1 6
2 9
1 9
2 10
1 10
2 11
1 11
1 11
2 13
2 13
2 13
2 13
2 13
2 13
2 13
1 13
1 13
1 13
1 11
1 16
2 18
2 18
1 18
2 18
2 18
2 13
2 18
2 18
2 18
2 18
1 18
1 20
1 21
2 21
2 21
1 21
2 23
1 23
1 23
1 25
1 25
1 27
1 27
2 29
2 29
2 29
2 29
2 29
1 29
2 29
1 29
1 29
2 29
2 29
2 29
2 29
2 29
2 29
1 29
1 33
1 34
1 34
2 34
2 34
2 34
1 29
2 34
1 33
2 34
2 34
2 34
2 33
2 34
2 34
1 34
1 39
2 40
2 40...

Output:
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.5000000000
0.5000000000
1.2500000000
0.5000000000
0.5000000000
0.5000000000
0.5000000000
0.5000000000
0.5000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.5000000000
0.8750000000
0.8750000000
0.8750000000
0.8750000000
0.8750000000
0.8750000000
0.7500000000
0.75000...

Output:
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.50000000
0.50000000
1.25000000
0.50000000
0.50000000
0.50000000
0.50000000
0.50000000
0.50000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.50000000
0.87500000
0.87500000
0.87500000
0.87500000
0.87500000
0.87500000
0.75000000
0.75000000
0.75000000
0.75000000
0.75000000
0.75000000
0.75000000
1.12500...

Input:
500000
1 1
1 1
1 3
2 3
1 3
2 5
1 5
1 6
1 6
2 6
2 6
1 6
2 9
1 9
2 9
1 9
2 11
1 11
2 11
1 11
2 11
2 11
2 11
2 11
2 11
1 11
2 14
2 14
1 14
1 15
1 16
1 16
2 18
1 18
2 19
2 19
2 19
1 19
1 19
2 21
2 21
1 21
1 21
2 23
1 23
1 23
1 23
1 26
2 26
2 26
2 26
1 26
1 28
1 29
1 30
2 31
1 31
2 31
1 31
2 31
2 31
2 31
2 31
2 31
1 31
2 34
2 34
1 34
2 35
1 35
1 36
2 37
2 37
2 37
2 37
1 37
2 37
2 37
2 37
1 37
1 37
1 40
1 40
2 40
1 40
1 43
2 4...

Output:
0.50000000
0.00000000
0.75000000
0.75000000
0.00000000
0.50000000
0.00000000
0.50000000
0.75000000
0.75000000
0.75000000
0.75000000
0.75000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.50000000
0.50000000
0.50000000
0.00000000
0.50000000
0.75000000
0.75000000
0.75000000
0.75000000
0.75000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.50000000
0.50000000
0.50000000
0.75000...

Output:
0.5000000000
0.0000000000
0.7500000000
0.7500000000
0.0000000000
0.5000000000
0.0000000000
0.5000000000
0.7500000000
0.7500000000
0.7500000000
0.7500000000
0.7500000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.5000000000
0.5000000000
0.5000000000
0.0000000000
0.5000000000
0.7500000000
0.7500000000
0.7500000000
0.7500000000
0.7500000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.00000...

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 1
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 1
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 1
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 1
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 1
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 1
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 1
1 86
1 8...

Output:
11.9999617828
11.9999617828
11.9999617828
11.9999617828
12.0000838531
12.0000838531
12.0000838531
12.0000838578
12.0000838578
12.0000838578
12.0000838578
12.0000838578
12.0000838578
12.0000838578
12.0000838578
12.0000838578
12.0000838578
12.0000838578
12.0000838578
12.0000838578
12.0000838578
12.0000838578
12.0000838578
12.0000838624
12.0000838624
12.0000838624
12.0000838624
12.0000838624
12.0000838624
12.0000838624
12.0000838671
12.0000838717
12.0000838717
12.0000838717
1...

Output:
11.99996178
11.99996178
11.99996178
11.99996178
12.00008385
12.00008385
12.00008385
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008386
12.00008387
12.00008387
12.00008387
12.00008387
12.00008387
12.00008388
12.00008388
12.00008388
12.00008388
12.0...

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 1
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 1
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 1
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 86
...

Output:
14.79904015
14.79904015
14.79904336
14.79904383
14.79904383
14.79904383
14.79904383
14.79904764
14.79904764
14.79904764
14.79904764
14.79904764
14.79905145
14.79905145
14.79905145
14.79905193
14.79905205
14.79905205
14.79905380
14.79905380
14.79905392
14.79906154
14.79906178
14.79906941
14.79907703
14.79907703
14.79908024
14.79908024
14.79908024
14.79908071
14.79908834
14.79908925
14.79908925
14.79908937
14.79909112
14.79909287
14.79909287
14.79909287
14.79909287
14.7...

Output:
14.7990401480
14.7990401480
14.7990433556
14.7990438314
14.7990438314
14.7990438314
14.7990438314
14.7990476427
14.7990476427
14.7990476427
14.7990476427
14.7990476427
14.7990514538
14.7990514538
14.7990514538
14.7990519295
14.7990520488
14.7990520488
14.7990537978
14.7990537978
14.7990539170
14.7990615433
14.7990617791
14.7990694052
14.7990770310
14.7990770310
14.7990802386
14.7990802386
14.7990802386
14.7990807143
14.7990883399
14.7990892532
14.7990892532
14.7990893717
1...

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 1
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 1
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 86...

Output:
14.26389623
14.26389646
14.26389670
14.26389670
14.26389670
14.26389670
14.26389670
14.26389670
14.26389670
14.26390577
14.26390577
14.26390577
14.26390589
14.26390589
14.26390589
14.26390859
14.26390859
14.26390906
14.26391085
14.26391088
14.26391088
14.26391088
14.26391100
14.26391100
14.26391147
14.26391149
14.26391418
14.26391430
14.26391430
14.26391454
14.26391454
14.26391501
14.26391502
14.26391502
14.26391502
14.26391771
14.26392373
14.26392373
14.26392373
14.2...

Output:
14.2638962260
14.2638964627
14.2638966993
14.2638967012
14.2638967021
14.2638967023
14.2638967027
14.2638967027
14.2638967046
14.2639057723
14.2639057723
14.2639057724
14.2639058912
14.2639058913
14.2639058922
14.2639085859
14.2639085861
14.2639090559
14.2639108529
14.2639108827
14.2639108827
14.2639108827
14.2639110014
14.2639110023
14.2639114721
14.2639114870
14.2639141804
14.2639142991
14.2639142992
14.2639145358
14.2639145358
14.2639150056
14.2639150205
14.2639150205
1...

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 1
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 1
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 86...

Output:
14.1345040635
14.1345168291
14.1345168296
14.1345168301
14.1345168301
14.1345168301
14.1345169489
14.1345169489
14.1345171857
14.1345171858
14.1345206068
14.1345206068
14.1345206072
14.1345312864
14.1345312864
14.1345313162
14.1345331224
14.1345331224
14.1345331224
14.1345331243
14.1345331252
14.1345392610
14.1345429972
14.1345429973
14.1345429973
14.1345429973
14.1345429973
14.1345429992
14.1345429992
14.1345429992
14.1345429992
14.1345429992
14.1345429996
14.1345464206
1...

Output:
14.13450406
14.13451683
14.13451683
14.13451683
14.13451683
14.13451683
14.13451695
14.13451695
14.13451719
14.13451719
14.13452061
14.13452061
14.13452061
14.13453129
14.13453129
14.13453132
14.13453312
14.13453312
14.13453312
14.13453312
14.13453313
14.13453926
14.13454300
14.13454300
14.13454300
14.13454300
14.13454300
14.13454300
14.13454300
14.13454300
14.13454300
14.13454300
14.13454300
14.13454642
14.13454642
14.13455710
14.13455710
14.13455803
14.13455803
14.1...

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 1
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 1
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 86...

Output:
14.05348019
14.05348042
14.05348042
14.05348043
14.05348043
14.05348043
14.05348043
14.05348090
14.05348090
14.05348090
14.05348093
14.05348093
14.05348093
14.05348117
14.05349456
14.05349456
14.05349456
14.05349908
14.05350918
14.05350918
14.05350918
14.05350924
14.05352263
14.05352265
14.05352265
14.05352265
14.05352446
14.05352446
14.05352446
14.05352539
14.05352539
14.05352539
14.05352539
14.05352539
14.05352539
14.05352542
14.05352542
14.05352542
14.05352994
14.0...

Output:
14.0534801868
14.0534804237
14.0534804237
14.0534804274
14.0534804283
14.0534804283
14.0534804302
14.0534809009
14.0534809009
14.0534809009
14.0534809307
14.0534809316
14.0534809316
14.0534811685
14.0534945566
14.0534945566
14.0534945566
14.0534990767
14.0535091832
14.0535091832
14.0535091832
14.0535092427
14.0535226304
14.0535226453
14.0535226453
14.0535226453
14.0535244569
14.0535244572
14.0535244572
14.0535253866
14.0535253866
14.0535253866
14.0535253866
14.0535253866
1...

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 1
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 1
1 86...

Output:
13.8714793856
13.8714801163
13.8714801163
13.8714801172
13.8714801173
13.8714801173
13.8714948788
13.8714949977
13.8714950020
13.8714959343
13.8714959344
13.8714959418
13.8714959418
13.8714994254
13.8714994254
13.8715137053
13.8715137053
13.8715200679
13.8715200679
13.8715200680
13.8715267486
13.8715269857
13.8715375980
13.8715375982
13.8715383287
13.8715383287
13.8715383287
13.8715526076
13.8715526076
13.8715526095
13.8715526095
13.8715530810
13.8715530810
13.8715530810
1...

Output:
13.87147939
13.87148012
13.87148012
13.87148012
13.87148012
13.87148012
13.87149488
13.87149500
13.87149500
13.87149593
13.87149593
13.87149594
13.87149594
13.87149943
13.87149943
13.87151371
13.87151371
13.87152007
13.87152007
13.87152007
13.87152675
13.87152699
13.87153760
13.87153760
13.87153833
13.87153833
13.87153833
13.87155261
13.87155261
13.87155261
13.87155261
13.87155308
13.87155308
13.87155308
13.87155401
13.87155401
13.87155401
13.87155403
13.87155403
13.8...

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 1
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 8...

Output:
13.5631431401
13.5631431401
13.5631431401
13.5631620258
13.5631620258
13.5631620258
13.5631620258
13.5631809103
13.5631997937
13.5631997937
13.5632016324
13.5632016324
13.5632016324
13.5632016324
13.5632016324
13.5632016324
13.5632016324
13.5632016324
13.5632016324
13.5632016324
13.5632016324
13.5632016324
13.5632016324
13.5632016622
13.5632016623
13.5632016641
13.5632016641
13.5632016641
13.5632016641
13.5632016641
13.5632016641
13.5632016641
13.5632016641
13.5632021366
1...

Output:
13.56314314
13.56314314
13.56314314
13.56316203
13.56316203
13.56316203
13.56316203
13.56318091
13.56319979
13.56319979
13.56320163
13.56320163
13.56320163
13.56320163
13.56320163
13.56320163
13.56320163
13.56320163
13.56320163
13.56320163
13.56320163
13.56320163
13.56320163
13.56320166
13.56320166
13.56320166
13.56320166
13.56320166
13.56320166
13.56320166
13.56320166
13.56320166
13.56320166
13.56320214
13.56320214
13.56320214
13.56320214
13.56320217
13.56321355
13.5...

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 1
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 8...

Output:
13.30940085
13.30940085
13.30940759
13.30940807
13.30940807
13.30940807
13.30940807
13.30940807
13.30940807
13.30940807
13.30941481
13.30941481
13.30941481
13.30941481
13.30941481
13.30941481
13.30941481
13.30941529
13.30941529
13.30941541
13.30941541
13.30941541
13.30941541
13.30941541
13.30941544
13.30941544
13.30941544
13.30941545
13.30941545
13.30941545
13.30941545
13.30942022
13.30942022
13.30942207
13.30942207
13.30942207
13.30942207
13.30942207
13.30942207
13.3...

Output:
13.3094008458
13.3094008458
13.3094075924
13.3094080656
13.3094080656
13.3094080656
13.3094080656
13.3094080656
13.3094080656
13.3094080656
13.3094148121
13.3094148121
13.3094148121
13.3094148121
13.3094148124
13.3094148124
13.3094148142
13.3094152874
13.3094152874
13.3094154064
13.3094154064
13.3094154064
13.3094154064
13.3094154064
13.3094154362
13.3094154362
13.3094154362
13.3094154511
13.3094154511
13.3094154511
13.3094154511
13.3094202181
13.3094202181
13.3094220677
1...

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 ...

Output:
9.2999737329
9.2999737329
9.2999737329
9.2999737329
9.2999737329
9.2999737329
9.2999737329
9.2999737329
9.2999737329
9.2999737329
9.2999737329
9.2999737329
9.2999737329
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.2999742095
9.30000...

Output:
9.29997373
9.29997373
9.29997373
9.29997373
9.29997373
9.29997373
9.29997373
9.29997373
9.29997373
9.29997373
9.29997373
9.29997373
9.29997373
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.29997421
9.30000381
9.30000381
9.30000381
9.30000381
9.30000381
9.30000381
9.30000...

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 ...

Output:
11.8837319160
11.8837319160
11.8837320352
11.8837320352
11.8837320352
11.8837320352
11.8837320352
11.8837320352
11.8837320352
11.8837320370
11.8837320370
11.8837320370
11.8837320370
11.8837320370
11.8837581061
11.8837599918
11.8837672799
11.8837672799
11.8837672799
11.8837672799
11.8837672836
11.8837672837
11.8837672837
11.8837672837
11.8837672837
11.8837700593
11.8837700593
11.8837701189
11.8837701189
11.8837955317
11.8838028198
11.8838028198
11.8838028198
11.8838028198
1...

Output:
11.88373192
11.88373192
11.88373204
11.88373204
11.88373204
11.88373204
11.88373204
11.88373204
11.88373204
11.88373204
11.88373204
11.88373204
11.88373204
11.88373204
11.88375811
11.88375999
11.88376728
11.88376728
11.88376728
11.88376728
11.88376728
11.88376728
11.88376728
11.88376728
11.88376728
11.88377006
11.88377006
11.88377012
11.88377012
11.88379553
11.88380282
11.88380282
11.88380282
11.88380282
11.88380282
11.88380282
11.88380282
11.88380282
11.88380282
11.8...

Input:
500000
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1...

Output: 1.00000000

Output: 1.0000000000

Input:
500000
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1...

Output:
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000...

Output:
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.00000...

Input:
500000
1 1
2 1
1 2
2 1
1 3
2 1
1 4
2 1
1 5
2 1
1 6
2 1
1 7
2 1
1 8
2 1
1 9
2 1
1 10
2 1
1 11
2 1
1 12
2 1
1 13
2 1
1 14
2 1
1 15
2 1
1 16
2 1
1 17
2 1
1 18
2 1
1 19
2 1
1 20
2 1
1 21
2 1
1 22
2 1
1 23
2 1
1 24
2 1
1 25
2 1
1 26
2 1
1 27
2 1
1 28
2 1
1 29
2 1
1 30
2 1
1 31
2 1
1 32
2 1
1 33
2 1
1 34
2 1
1 35
2 1
1 36
2 1
1 37
2 1
1 38
2 1
1 39
2 1
1 40
2 1
1 41
2 1
1 42
2 1
1 43
2 1
1 44
2 1
1 45
2 1
1 46
2 1
1 47
...

Output:
0.5000000000
0.7500000000
0.8750000000
0.9375000000
0.9687500000
0.9843750000
0.9921875000
0.9960937500
0.9980468750
0.9990234375
0.9995117188
0.9997558594
0.9998779297
0.9999389648
0.9999694824
0.9999847412
0.9999923706
0.9999961853
0.9999980927
0.9999990463
0.9999995232
0.9999997616
0.9999998808
0.9999999404
0.9999999702
0.9999999851
0.9999999925
0.9999999963
0.9999999981
0.9999999991
0.9999999995
0.9999999998
0.9999999999
0.9999999999
1.0000000000
1.0000000000
1.00000...

Output:
0.50000000
0.75000000
0.87500000
0.93750000
0.96875000
0.98437500
0.99218750
0.99609375
0.99804688
0.99902344
0.99951172
0.99975586
0.99987793
0.99993896
0.99996948
0.99998474
0.99999237
0.99999619
0.99999809
0.99999905
0.99999952
0.99999976
0.99999988
0.99999994
0.99999997
0.99999999
0.99999999
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000...

Input:
499999
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 ...

Output: 1.5000000000

Output: 1.50000000

Input:
500000
2 1
2 1
2 1
1 1
1 2
1 3
1 4
1 5
1 6
1 2
1 8
1 9
1 1
2 1
1 2
2 11
1 11
1 13
2 1
1 10
1 15
1 16
1 17
1 18
1 7
1 20
1 21
1 7
1 23
1 19
1 25
1 21
1 27
1 28
1 29
1 30
1 14
1 32
1 33
1 34
1 35
1 22
2 2
1 19
1 31
1 39
1 40
1 41
1 11
2 31
2 19
1 22
1 44
2 37
2 31
1 24
1 46
1 47
1 48
1 49
1 45
1 51
1 52
1 53
2 24
1 42
1 55
2 26
1 50
1 57
1 58
1 54
1 60
1 61
1 62
1 45
1 64
1 65
1 66
1 10
1 68
1 69
1 70
1 1
2 42
2 26
1 67
1...

Output:
0.00000000
0.00000000
0.00000000
1.50781250
0.00000000
1.80859375
1.80735779
0.93750000
1.00000000
0.00000000
0.93750000
0.96875000
0.00000000
0.75000000
0.00000000
1.60546875
0.98437500
0.00000000
0.00000000
1.65496826
0.00000000
0.50000000
1.89506586
0.87500000
1.89506872
1.00000000
0.00000000
1.61523438
1.41684914
0.00000000
0.75000000
1.43359375
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.75000000
0.00000000
3.19373609
1.51562500
0.00000...

Output:
0.0000000000
0.0000000000
0.0000000000
1.5078125000
0.0000000000
1.8085937500
1.8073577881
0.9375000000
1.0000000000
0.0000000000
0.9375000000
0.9687500000
0.0000000000
0.7500000000
0.0000000000
1.6054687500
0.9843750000
0.0000000000
0.0000000000
1.6549682617
0.0000000000
0.5000000000
1.8950658601
0.8750000000
1.8950687211
1.0000000000
0.0000000000
1.6152343750
1.4168491364
0.0000000000
0.7500000000
1.4335937500
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.00000...

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 1
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
2 24
1 9
2 1
1 25
1 26
1 27
1 28
1 14
1 30
1 31
1 32
1 25
1 34
1 35
1 36
1 37
1 38
1 39
2 14
2 1
1 24
1 41
1 42
1 43
1 24
1 45
1 46
1 47
1 48
1 49
1 25
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 24
1 61
1 62
1 50
1 64
1 65
1 63
1 67
1 14
1 69
1 70
2 14
2 25
2 25
2 66
1 66
1 72
1 73
1 44
1 75
1 76
1 77
1 78
...

Output:
0.00000000
1.66654301
0.93750000
1.66926652
1.48437500
2.07415771
2.07415771
0.00000000
0.00000000
0.00000000
1.53906250
1.53906250
0.00000000
0.00000000
0.00000000
2.73195743
2.17917140
0.00000000
0.00000000
0.99999237
0.00000000
0.00000000
0.99218750
0.00000000
1.82131805
0.00000000
0.99999905
0.99993896
0.00000000
2.08268230
0.00000000
0.00000000
0.00000000
0.99999619
2.34234656
0.00000000
2.29980469
0.00000000
1.63562012
2.80346214
0.00000000
0.99902344
0.00000...

Output:
0.0000000000
1.6665430069
0.9375000000
1.6692665219
1.4843750000
2.0741577148
2.0741577148
0.0000000000
0.0000000000
0.0000000000
1.5390625000
1.5390625000
0.0000000000
0.0000000000
0.0000000000
2.7319574328
2.1791713953
0.0000000000
0.0000000000
0.9999923706
0.0000000000
0.0000000000
0.9921875000
0.0000000000
1.8213180453
0.0000000000
0.9999990463
0.9999389648
0.0000000000
2.0826823041
0.0000000000
0.0000000000
0.0000000000
0.9999961853
2.3423465630
0.0000000000
2.29980...

Input:
500000
2 1
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 1
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 14
1 46
1 47
1 14
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 1
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 1
1 73
2 32
1 1
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
2...

Output:
0.00000000
0.00000000
0.99218750
0.00000000
0.00000000
0.00000000
0.99987793
1.66252136
0.98437500
0.00000000
0.00000000
1.43752646
2.86997778
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
1.66544628
0.87500000
0.99902344
2.13847190
2.27953993
0.00000000
0.00000000
2.15443870
1.54492188
0.99987793
1.25247955
0.99987793
0.00000000
0.00000000
0.00000000
0.00000000
1.54687476
0.00000000
0.00000000
2.50512229
0.00000000
0.00000000
0.99996...

Output:
0.0000000000
0.0000000000
0.9921875000
0.0000000000
0.0000000000
0.0000000000
0.9998779297
1.6625213623
0.9843750000
0.0000000000
0.0000000000
1.4375264645
2.8699777826
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
1.6654462814
0.8750000000
0.9990234375
2.1384719014
2.2795399278
0.0000000000
0.0000000000
2.1544386972
1.5449218750
0.9998779297
1.2524795532
0.9998779297
0.0000000000
0.0000000000
0.0000000000
0.0000000000
1.54687...

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
2 18
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 ...

Output:
0.00000000
0.00000000
1.66667175
0.00000000
0.00000000
0.00000000
1.66667175
0.00000000
0.00000000
0.00000000
1.66666667
0.00000000
2.50475173
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
1.65887451
1.00000000
2.50475173
0.99999994
0.00000000
2.50475173
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
2.14285714
2.50475173
1.66666667
0.50000000
0.00000000
1.60546875
1.00000000
1.66666667
0.00000000
1.66666667
0.00000000
0.00000000
0.00000...

Output:
0.0000000000
0.0000000000
1.6666717529
0.0000000000
0.0000000000
0.0000000000
1.6666717529
0.0000000000
0.0000000000
0.0000000000
1.6666666665
0.0000000000
2.5047517324
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
1.6588745117
1.0000000000
2.5047517324
0.9999999404
0.0000000000
2.5047517324
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
2.1428571430
2.5047517324
1.6666666667
0.5000000000
0.0000000000
1.6054687500
1.00000...

Input:
500000
2 1
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 8...

Output:
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
1.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
1.6665446013
1.0000000000
0.0000000000
2.7941628264
0.0000000000
0.0000000000
0.0000000000
1.0000000000
1.0000000000
0.0000000000
3.0348182284
0.0000000000
0.0000000000
0.0000000000
1.6666666667
0.0000000000
0.0000000000
1.6666666667
0.0000000000
0.0000000000
1.0000000000
2.7864312991
1.00000...

Output:
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
1.00000000
0.00000000
0.00000000
0.00000000
0.00000000
1.66654460
1.00000000
0.00000000
2.79416283
0.00000000
0.00000000
0.00000000
1.00000000
1.00000000
0.00000000
3.03481823
0.00000000
0.00000000
0.00000000
1.66666667
0.00000000
0.00000000
1.66666667
0.00000000
0.00000000
1.00000000
2.78643130
1.00000000
0.00000000
1.66666667
0.00000000
0.00000000
0.00000000
0.00000...

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 ...

Output:
0.00000000
0.00000000
0.00000000
0.00000000
1.00000000
0.00000000
1.00000000
1.00000000
0.00000000
2.14261304
2.79416283
0.00000000
0.00000000
0.00000000
2.50476190
0.00000000
2.14285714
0.00000000
0.00000000
2.14285714
0.00000000
1.00000000
1.00000000
2.79416283
1.00000000
0.00000000
3.03481823
0.00000000
0.00000000
1.00000000
1.00000000
2.14285714
1.00000000
1.00000000
0.99218750
0.00000000
0.00000000
1.00000000
0.00000000
1.00000000
0.00000000
0.00000000
1.66666...

Output:
0.0000000000
0.0000000000
0.0000000000
0.0000000000
1.0000000000
0.0000000000
1.0000000000
1.0000000000
0.0000000000
2.1426130420
2.7941628264
0.0000000000
0.0000000000
0.0000000000
2.5047619048
0.0000000000
2.1428571429
0.0000000000
0.0000000000
2.1428571429
0.0000000000
1.0000000000
1.0000000000
2.7941628264
1.0000000000
0.0000000000
3.0348182284
0.0000000000
0.0000000000
0.9999999998
1.0000000000
2.1428571427
1.0000000000
1.0000000000
0.9921875000
0.0000000000
0.00000...

Input:
500000
2 1
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 8...

Output:
0.0000000000
0.0000000000
2.5047619048
1.0000000000
1.0000000000
0.0000000000
0.0000000000
0.0000000000
1.6666666667
0.0000000000
1.0000000000
1.0000000000
1.0000000000
0.0000000000
2.5047619048
1.0000000000
0.0000000000
1.6666666667
1.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
1.6666666667
0.0000000000
1.0000000000
0.0000000000
1.0000000000
0.0000000000
2.5047619048
2.14285...

Output:
0.00000000
0.00000000
2.50476190
1.00000000
1.00000000
0.00000000
0.00000000
0.00000000
1.66666667
0.00000000
1.00000000
1.00000000
1.00000000
0.00000000
2.50476190
1.00000000
0.00000000
1.66666667
1.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
1.66666667
0.00000000
1.00000000
0.00000000
1.00000000
0.00000000
2.50476190
2.14285714
1.00000000
2.14285714
2.79416283
0.00000000
1.00000000
1.00000...

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 ...

Output:
1.0000000000
1.0000000000
1.6666666667
1.0000000000
0.0000000000
1.0000000000
0.0000000000
0.0000000000
0.0000000000
1.6666666667
0.0000000000
0.0000000000
1.0000000000
2.7941628264
0.0000000000
0.0000000000
1.0000000000
1.0000000000
2.1428571429
1.6666666667
2.5047619048
1.6666666667
0.0000000000
1.6666666667
1.0000000000
1.0000000000
0.0000000000
2.1428571429
0.0000000000
2.5047619048
1.0000000000
0.0000000000
1.0000000000
1.6666666667
0.0000000000
1.0000000000
1.00000...

Output:
1.00000000
1.00000000
1.66666667
1.00000000
0.00000000
1.00000000
0.00000000
0.00000000
0.00000000
1.66666667
0.00000000
0.00000000
1.00000000
2.79416283
0.00000000
0.00000000
1.00000000
1.00000000
2.14285714
1.66666667
2.50476190
1.66666667
0.00000000
1.66666667
1.00000000
1.00000000
0.00000000
2.14285714
0.00000000
2.50476190
1.00000000
0.00000000
1.00000000
1.66666667
0.00000000
1.00000000
1.00000000
2.14285714
0.00000000
1.00000000
1.00000000
0.00000000

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 ...

Output:
1.66666667
1.00000000
0.00000000
0.00000000
0.00000000
1.00000000

Output:
1.6666666667
1.0000000000
0.0000000000
0.0000000000
0.0000000000
1.0000000000

Input:
500000
2 1
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 8...

Output:
0.0000000000
0.0000000000

Output:
0.00000000
0.00000000

Input:
500000
2 1
2 1
1 1
2 1
1 1
2 1
1 2
1 2
1 3
1 3
2 1
1 4
1 4
2 1
1 5
2 5
2 3
2 1
1 5
1 6
2 1
1 6
1 7
2 1
1 7
1 8
1 8
2 1
1 9
2 6
2 1
2 1
2 4
1 9
2 6
1 10
1 10
1 11
2 1
1 11
2 4
1 12
2 1
2 1
2 5
1 12
2 1
2 1
1 13
1 13
1 14
2 4
1 14
1 15
2 3
1 15
2 1
2 8
2 1
2 5
1 16
2 1
1 16
1 17
2 16
2 8
1 17
2 16
1 18
2 17
1 18
1 19
1 19
1 20
1 20
2 19
1 21
1 21
1 22
2 1
2 1
1 22
1 23
2 9
2 9
2 1
2 17
1 23
2 1
2 1
1 24
2 1
1 24
2 1...

Output:
0.00000000
0.00000000
0.50000000
0.75000000
1.35937500
1.54687500
0.50000000
0.75000000
1.62500000
1.75097656
1.84875488
1.96966553
0.75000000
2.00872803
2.00872803
1.28125000
0.75000000
2.12060547
1.35937500
2.18054390
2.18054390
1.35937500
2.20372295
2.20372295
1.35937500
1.84875488
2.32575253
0.75000000
2.32575253
1.35937500
2.35700253
0.75000000
1.28125000
0.75000000
0.75000000
0.75000000
2.52750329
2.52750329
1.35937500
1.35937500
2.54563456
0.75000000
2.55067...

Output:
0.0000000000
0.0000000000
0.5000000000
0.7500000000
1.3593750000
1.5468750000
0.5000000000
0.7500000000
1.6250000000
1.7509765625
1.8487548828
1.9696655273
0.7500000000
2.0087280273
2.0087280273
1.2812500000
0.7500000000
2.1206054688
1.3593750000
2.1805438995
2.1805438995
1.3593750000
2.2037229538
2.2037229538
1.3593750000
1.8487548828
2.3257525256
0.7500000000
2.3257525256
1.3593750000
2.3570025256
0.7500000000
1.2812500000
0.7500000000
0.7500000000
0.7500000000
2.52750...

Input:
500000
1 1
1 1
2 2
1 2
1 2
1 3
2 1
2 1
2 1
2 3
1 3
2 1
1 4
2 1
1 4
1 5
2 5
1 5
1 6
2 1
1 6
1 7
1 7
1 8
1 8
1 9
2 3
1 9
1 10
1 10
2 1
1 11
2 1
1 11
2 1
1 12
1 12
2 1
2 1
2 4
1 13
2 11
2 12
2 1
2 3
1 13
2 4
1 14
2 12
1 14
1 15
2 15
1 15
1 16
1 16
1 17
1 17
2 15
1 18
2 1
1 18
1 19
2 1
2 13
1 19
2 9
1 20
2 8
2 4
1 20
2 1
1 21
1 21
2 1
2 1
2 1
2 1
2 2
2 1
1 22
2 1
2 1
2 1
1 22
2 13
2 1
2 21
2 1
2 1
2 9
1 23
2 1
1 23
1 ...

Output:
0.00000000
1.28125000
1.28125000
1.28125000
0.50000000
1.35937500
1.48437500
0.50000000
1.75097656
1.35937500
2.09344482
2.12060547
2.13418579
2.20372295
2.20372295
1.35937500
0.75000000
0.75000000
2.23269677
1.62500000
1.35937500
0.75000000
0.50000000
0.75000000
2.42365292
2.44809750
0.75000000
1.35937500
1.35937500
1.87591553
2.48965624
2.51138660
2.51138660
2.51138660
2.51138660
2.24718368
2.51138660
2.52750329
2.52750329
2.52750329
0.75000000
2.53556163
0.75000...

Output:
0.0000000000
1.2812500000
1.2812500000
1.2812500000
0.5000000000
1.3593750000
1.4843750000
0.5000000000
1.7509765625
1.3593750000
2.0934448242
2.1206054688
2.1341857910
2.2037229538
2.2037229538
1.3593750000
0.7500000000
0.7500000000
2.2326967716
1.6250000000
1.3593750000
0.7500000000
0.5000000000
0.7500000000
2.4236529162
2.4480974963
0.7500000000
1.3593750000
1.3593750000
1.8759155273
2.4896562388
2.5113866022
2.5113866022
2.5113866022
2.5113866022
2.2471836805
2.51138...

Input:
500000
2 1
1 1
2 1
2 1
2 1
1 1
2 1
1 2
2 2
1 2
1 3
1 3
1 4
2 1
2 3
2 3
2 1
2 2
2 2
2 1
2 1
1 4
1 5
2 1
2 1
1 5
2 2
2 1
1 6
1 6
1 7
1 7
1 8
2 1
2 1
2 1
2 1
1 8
1 9
1 9
1 10
1 10
1 11
2 7
2 5
2 5
1 11
2 1
1 12
2 9
2 1
1 12
2 1
1 13
2 1
2 1
2 1
1 13
1 14
2 9
1 14
1 15
1 15
1 16
2 9
2 1
1 16
1 17
1 17
2 1
1 18
1 18
1 19
1 19
1 20
2 3
2 1
2 5
1 20
2 16
1 21
1 21
1 22
2 1
1 22
1 23
1 23
1 24
1 24
1 25
1 25
2 22
1 26
2 7...

Output:
0.0000000000
0.5000000000
0.5000000000
0.5000000000
0.7500000000
0.5000000000
1.4843750000
0.7500000000
0.7500000000
1.4843750000
1.0000000000
1.0000000000
1.4843750000
1.4843750000
1.6250000000
1.6250000000
1.3593750000
1.6640625000
1.9384155273
1.9384155273
1.9384155273
1.9384155273
0.7500000000
1.2812500000
1.2812500000
2.1341857910
0.7500000000
2.1805438995
2.2037229538
2.2326967716
2.2326967716
2.2326967716
0.7500000000
0.7500000000
2.3570025256
2.4019244006
1.87591...

Output:
0.00000000
0.50000000
0.50000000
0.50000000
0.75000000
0.50000000
1.48437500
0.75000000
0.75000000
1.48437500
1.00000000
1.00000000
1.48437500
1.48437500
1.62500000
1.62500000
1.35937500
1.66406250
1.93841553
1.93841553
1.93841553
1.93841553
0.75000000
1.28125000
1.28125000
2.13418579
0.75000000
2.18054390
2.20372295
2.23269677
2.23269677
2.23269677
0.75000000
0.75000000
2.35700253
2.40192440
1.87591553
2.47806671
1.48437500
0.75000000
2.52750329
0.75000000
1.35937...

Input:
500000
1 1
2 1
1 1
2 1
1 1
2 1
2 1
2 1
1 2
2 1
2 1
1 3
2 1
2 1
2 3
2 1
2 3
1 3
2 1
1 4
2 3
2 4
1 4
2 2
2 3
1 4
2 1
1 4
1 5
1 5
1 5
2 1
2 3
2 2
2 3
2 1
1 6
2 6
2 1
1 6
2 2
1 6
2 1
2 6
2 1
1 7
1 7
2 2
2 1
1 8
1 8
1 8
2 1
2 1
1 8
1 9
1 9
1 9
1 9
2 1
2 4
1 10
1 11
2 8
1 11
1 11
2 1
2 1
1 12
2 9
1 12
2 1
2 8
2 9
1 13
2 7
1 14
2 7
1 15
2 4
1 15
1 16
1 16
1 16
1 17
1 17
1 18
2 6
2 1
1 18
1 18
2 1
1 18
1 19
1 20
1 20
2...

Output:
0.5000000000
0.7500000000
0.8750000000
0.8750000000
0.8750000000
1.1250000000
1.1250000000
1.3125000000
1.3125000000
0.5000000000
1.3125000000
0.5000000000
1.4062500000
0.7500000000
0.5000000000
0.5000000000
0.7500000000
1.6113281250
1.8447265625
0.7500000000
0.9375000000
0.7500000000
1.8447265625
0.5000000000
1.9423828125
0.9375000000
2.0156250000
0.8750000000
2.0156250000
0.9375000000
2.0980224609
2.2135124207
2.2135124207
2.2874981761
1.6552734375
0.9375000000
2.33056...

Output:
0.50000000
0.75000000
0.87500000
0.87500000
0.87500000
1.12500000
1.12500000
1.31250000
1.31250000
0.50000000
1.31250000
0.50000000
1.40625000
0.75000000
0.50000000
0.50000000
0.75000000
1.61132813
1.84472656
0.75000000
0.93750000
0.75000000
1.84472656
0.50000000
1.94238281
0.93750000
2.01562500
0.87500000
2.01562500
0.93750000
2.09802246
2.21351242
2.21351242
2.28749818
1.65527344
0.93750000
2.33056926
2.33056926
0.93750000
2.42431926
0.93750000
0.93750000
0.75000...

Input:
500000
2 1
2 1
1 1
2 1
2 1
2 1
1 1
1 1
1 1
1 2
1 2
1 2
1 2
2 1
2 1
2 1
1 3
1 3
2 1
1 4
2 4
2 3
2 5
2 1
2 1
1 5
2 1
1 6
1 6
2 1
1 6
1 6
2 1
2 7
2 4
2 1
1 7
1 7
2 4
1 7
1 8
1 9
1 9
1 10
2 1
1 10
2 3
1 10
2 3
2 1
1 10
1 11
2 2
2 6
1 11
1 12
1 13
1 13
1 13
1 13
2 7
2 7
1 14
2 1
2 1
2 6
1 14
2 7
1 14
1 14
1 15
2 11
1 16
2 11
2 1
1 16
1 17
2 13
2 3
2 1
1 17
2 1
2 10
2 1
2 13
1 18
2 1
1 18
2 5
2 1
1 19
2 1
2 1
1 19
2 1
...

Output:
0.00000000
0.00000000
0.50000000
0.50000000
0.50000000
1.40625000
1.40625000
1.40625000
1.60546875
0.50000000
0.75000000
0.00000000
1.68847656
1.68847656
1.75073242
1.93823242
1.98510742
0.00000000
0.50000000
1.98510742
0.50000000
2.25194931
1.12500000
1.18750000
2.30539036
1.79742432
0.93750000
0.87500000
0.87500000
2.55889383
2.55889383
1.18750000
0.87500000
0.75000000
0.75000000
2.67168680
0.93750000
1.41796875
2.69970193
2.70748392
0.93750000
2.70748392
0.93750...

Output:
0.0000000000
0.0000000000
0.5000000000
0.5000000000
0.5000000000
1.4062500000
1.4062500000
1.4062500000
1.6054687500
0.5000000000
0.7500000000
0.0000000000
1.6884765625
1.6884765625
1.7507324219
1.9382324219
1.9851074219
0.0000000000
0.5000000000
1.9851074219
0.5000000000
2.2519493103
1.1250000000
1.1875000000
2.3053903580
1.7974243164
0.9375000000
0.8750000000
0.8750000000
2.5588938290
2.5588938290
1.1875000000
0.8750000000
0.7500000000
0.7500000000
2.6716867978
0.93750...

Input:
500000
1 1
1 2
1 2
2 1
2 1
1 2
2 1
2 1
1 2
1 3
1 4
2 1
2 1
1 4
2 1
2 1
1 4
2 1
2 4
1 5
1 6
2 1
2 1
1 6
1 7
1 7
2 1
1 7
2 1
1 7
1 8
1 8
1 8
2 1
1 8
2 3
1 9
2 4
1 9
1 9
2 2
2 1
2 1
2 5
1 10
2 2
2 4
2 7
2 1
1 11
2 3
1 12
2 9
1 12
1 12
2 1
2 1
2 1
1 12
2 5
2 1
2 5
1 13
2 8
2 13
1 13
1 14
1 14
1 14
2 1
1 14
1 15
1 15
1 15
2 11
1 16
1 16
2 1
1 17
2 16
1 17
2 16
1 17
2 8
2 6
2 1
2 10
2 1
2 1
1 18
2 19
1 19
2 1
2 11
2 11...

Output:
0.87500000
0.87500000
0.93750000
0.93750000
1.18750000
1.18750000
1.23437500
1.23437500
1.25781250
0.87500000
1.35009766
1.35009766
1.46362305
1.47924805
1.57080078
0.96875000
1.47656250
2.24253845
1.62126923
1.62126923
0.50000000
2.27113724
1.65087891
0.93750000
1.63556862
0.96875000
0.87500000
1.70970400
1.70970400
1.70970400
0.75000000
1.71290739
0.75000000
0.93750000
0.50000000
1.78801644
0.50000000
1.83498299
0.75000000
0.75000000
0.93750000
1.41796875
1.84519...

Output:
0.8750000000
0.8750000000
0.9375000000
0.9375000000
1.1875000000
1.1875000000
1.2343750000
1.2343750000
1.2578125000
0.8750000000
1.3500976562
1.3500976562
1.4636230469
1.4792480469
1.5708007812
0.9687500000
1.4765625000
2.2425384521
1.6212692261
1.6212692261
0.5000000000
2.2711372375
1.6508789062
0.9375000000
1.6355686188
0.9687500000
0.8750000000
1.7097040042
1.7097040042
1.7097040042
0.7500000000
1.7129073851
0.7500000000
0.9375000000
0.5000000000
1.7880164380
0.50000...

Input:
500000
2 1
1 1
1 1
1 1
2 1
1 2
2 1
2 1
1 2
2 1
2 2
2 1
1 2
1 3
2 1
1 3
2 1
2 1
1 3
2 1
2 3
1 4
1 4
2 1
1 4
2 1
2 1
1 5
2 1
2 1
2 1
2 1
1 5
1 5
2 1
1 6
2 1
1 6
2 1
1 6
2 1
1 7
1 7
1 7
1 8
1 8
2 4
2 3
2 5
2 1
2 1
2 1
2 1
1 8
2 1
1 9
2 9
2 1
1 9
1 9
2 7
2 10
2 1
1 10
2 1
2 2
1 10
2 5
2 9
2 1
1 10
2 4
2 1
1 11
2 1
1 11
2 1
2 1
1 11
1 12
1 12
1 12
2 13
1 13
2 5
2 13
1 13
1 13
1 14
2 7
1 14
2 1
1 14
1 15
1 15
2 11
1 ...

Output:
0.00000000
0.87500000
1.12500000
1.12500000
1.25000000
0.75000000
1.25000000
1.45312500
1.52343750
1.52343750
1.55859375
0.87500000
1.67724609
1.69702148
1.69702148
1.82202148
1.82202148
1.82202148
1.82202148
1.91577148
1.98608398
2.02124023
2.03881836
0.87500000
1.25000000
0.87500000
2.21846771
2.21846771
2.21846771
2.21846771
2.23687363
0.50000000
2.27828693
0.87500000
0.00000000
2.30934691
2.33264190
1.69702148
0.87500000
0.87500000
2.34428939
0.87500000
2.35011...

Output:
0.0000000000
0.8750000000
1.1250000000
1.1250000000
1.2500000000
0.7500000000
1.2500000000
1.4531250000
1.5234375000
1.5234375000
1.5585937500
0.8750000000
1.6772460938
1.6970214844
1.6970214844
1.8220214844
1.8220214844
1.8220214844
1.8220214844
1.9157714844
1.9860839844
2.0212402344
2.0388183594
0.8750000000
1.2500000000
0.8750000000
2.2184677124
2.2184677124
2.2184677124
2.2184677124
2.2368736267
0.5000000000
2.2782869339
0.8750000000
0.0000000000
2.3093469143
2.33264...

Input:
500000
2 1
2 1
1 1
2 1
2 1
2 1
2 1
1 1
1 1
2 1
2 1
1 1
1 1
2 1
1 2
2 1
2 2
2 1
1 2
2 1
1 2
2 1
1 2
2 1
2 1
2 1
2 1
1 2
1 3
2 2
2 1
2 3
1 3
1 3
1 3
1 3
1 4
2 1
2 1
1 4
2 1
2 1
2 1
1 4
2 4
2 4
2 1
2 2
1 4
1 4
2 5
1 5
2 1
2 4
1 5
2 3
1 5
2 3
2 1
1 5
1 5
2 3
1 6
2 1
2 1
1 6
1 6
2 6
2 3
1 6
2 1
2 1
2 5
2 1
1 6
2 1
2 1
2 1
1 7
2 5
2 1
2 3
2 3
2 2
2 4
2 2
1 7
2 1
1 7
1 7
1 7
2 1
1 8
2 7
2 1
1 8
2 8
1 8
2 1
1 8
1 8...

Output:
0.0000000000
0.0000000000
0.5000000000
0.5000000000
0.5000000000
0.5000000000
0.8750000000
0.8750000000
0.9687500000
1.2187500000
0.5000000000
1.2187500000
1.3437500000
1.4062500000
1.4375000000
1.4375000000
1.4375000000
1.4375000000
0.9687500000
1.5820312500
0.5000000000
1.7693481445
1.7693481445
1.8025817871
1.8025817871
1.8025817871
0.8750000000
0.8750000000
1.8191986084
0.9687500000
0.0000000000
1.8659334183
0.9687500000
0.9687500000
0.9687500000
1.8916375637
0.96875...

Output:
0.00000000
0.00000000
0.50000000
0.50000000
0.50000000
0.50000000
0.87500000
0.87500000
0.96875000
1.21875000
0.50000000
1.21875000
1.34375000
1.40625000
1.43750000
1.43750000
1.43750000
1.43750000
0.96875000
1.58203125
0.50000000
1.76934814
1.76934814
1.80258179
1.80258179
1.80258179
0.87500000
0.87500000
1.81919861
0.96875000
0.00000000
1.86593342
0.96875000
0.96875000
0.96875000
1.89163756
0.96875000
1.91573520
1.91573520
0.87500000
0.96875000
1.93119785
1.93119...

Input:
500000
2 1
2 1
2 1
2 1
1 1
1 1
1 1
1 1
2 1
2 1
2 1
1 1
1 1
2 1
2 1
2 2
2 1
2 1
2 1
2 1
2 1
1 2
1 2
2 1
1 2
2 1
2 1
2 1
2 1
1 2
2 1
2 1
2 1
2 1
1 2
2 2
2 2
1 2
1 3
1 3
2 1
2 1
2 1
1 3
2 1
1 3
1 3
2 1
2 2
1 3
2 1
2 2
1 4
1 4
1 4
1 4
2 4
2 1
1 4
1 4
2 4
1 5
2 1
2 2
2 3
2 1
2 1
2 5
2 4
2 5
1 5
2 1
2 3
1 5
1 5
2 1
2 1
2 1
1 5
2 1
1 5
1 6
1 6
2 3
2 4
2 5
2 5
1 6
1 6
2 1
1 6
2 1
1 6
2 1
1 7
2 1
1 7
1 7
1 7
1 7
1 7...

Output:
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.9375000000
0.9375000000
0.9375000000
0.9843750000
0.9843750000
0.0000000000
0.9843750000
0.9843750000
0.9843750000
0.9843750000
0.9843750000
1.3593750000
1.4218750000
1.4218750000
1.4218750000
1.4218750000
1.4531250000
1.4531250000
1.4531250000
1.4531250000
0.9687500000
0.9687500000
1.6669921875
1.6669921875
1.6669921875
1.6987304688
1.7225341797
0.9843750000
1.7265014648
0.9843750000
0.9375000000
1.8473796844
0.98437...

Output:
0.00000000
0.00000000
0.00000000
0.00000000
0.93750000
0.93750000
0.93750000
0.98437500
0.98437500
0.00000000
0.98437500
0.98437500
0.98437500
0.98437500
0.98437500
1.35937500
1.42187500
1.42187500
1.42187500
1.42187500
1.45312500
1.45312500
1.45312500
1.45312500
0.96875000
0.96875000
1.66699219
1.66699219
1.66699219
1.69873047
1.72253418
0.98437500
1.72650146
0.98437500
0.93750000
1.84737968
0.98437500
1.88616145
0.98437500
0.98437500
1.88616145
1.88616145
0.50000...

Input:
500000
2 1
1 1
1 1
2 1
1 1
1 1
1 1
1 1
2 1
2 1
1 1
1 1
2 1
1 1
1 1
2 1
2 1
1 1
2 1
1 1
2 1
1 1
1 1
1 1
1 1
2 1
2 1
2 1
1 1
1 1
1 1
2 1
1 1
2 1
2 1
2 1
2 1
1 1
1 1
1 1
2 1
1 1
2 1
2 1
2 1
1 1
1 1
2 1
2 1
1 1
1 1
1 1
2 1
1 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
1 1
1 1
2 1
2 1
2 1
1 1
1 1
2 1
1 1
1 1
2 1
1 1
1 1
2 1
2 1
2 1
2 1
1 1
1 1
2 1
2 1
1 1
2 1
1 1
1 1
1 1
1 1
2 1
1 1
2 1
2 1
2 1
2 1
2 1
1 1...

Output:
0.00000000
0.75000000
0.98437500
0.98437500
0.99609375
0.99902344
0.99902344
0.99951172
0.99975586
0.99998474
0.99998474
0.99998474
0.99999809
0.99999905
0.99999905
0.99999905
0.99999905
0.99999988
0.99999994
0.99999994
0.99999994
0.99999999
0.99999999
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000...

Output:
0.0000000000
0.7500000000
0.9843750000
0.9843750000
0.9960937500
0.9990234375
0.9990234375
0.9995117188
0.9997558594
0.9999847412
0.9999847412
0.9999847412
0.9999980927
0.9999990463
0.9999990463
0.9999990463
0.9999990463
0.9999998808
0.9999999404
0.9999999404
0.9999999404
0.9999999851
0.9999999851
0.9999999981
0.9999999991
0.9999999991
0.9999999991
0.9999999991
0.9999999991
0.9999999991
0.9999999991
0.9999999991
0.9999999991
0.9999999991
0.9999999991
0.9999999991
0.99999...

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 ...

Output:
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
0.9997558594
1.0000000000
1.0000000000
1.0000000000
0.9999999963
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
0.9999999925
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.00000...

Output:
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
0.99975586
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
0.99999999
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000...

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 ...

Output:
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
0.9999999925
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.00000...

Output:
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
0.99999999
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000...

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 ...

Output:
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000...

Output:
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
0.9999999981
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.00000...

Input:
499999
1 1
1 2
1 1
1 4
1 5
1 6
1 1
1 8
1 9
1 10
1 3
1 12
1 13
1 14
1 15
1 3
1 17
1 18
1 19
1 20
1 16
1 22
1 16
1 7
1 1
1 26
1 27
1 28
1 29
1 1
1 31
1 25
1 33
1 34
1 35
1 1
1 7
1 38
1 39
1 21
1 41
1 42
1 23
1 36
1 45
1 46
1 37
1 48
1 49
1 50
1 51
1 30
1 53
1 7
1 55
1 1
1 57
1 58
1 59
1 60
1 25
1 62
1 63
1 64
1 65
1 24
1 67
1 68
1 69
1 25
1 71
1 72
1 73
1 21
1 1
1 76
1 77
1 78
1 66
1 80
1 81
1 16
1 83
1 84
1 85
1 86
1 56
...

Output:
7.17195910
3.90154699
6.80309398
1.82891445
2.65782889
4.31565778
7.63131556
1.63308409
2.26616818
3.53233636
6.06467271
1.43105090
1.86210180
2.72420360
4.44840720
7.89681440
1.29305550
1.58611100
2.17222199
3.34444399
5.68888797
3.21348335
5.42696670
6.23143742
5.40359297
1.24953701
1.49907402
1.99814805
2.99629610
4.99259219
2.98948444
4.97896887
1.62905200
2.25810399
3.51620798
6.03241596
4.39222434
1.65801755
2.31603509
3.63207019
1.92129794
2.84259589
4.68519...

Output:
7.1719590976
3.9015469881
6.8030939761
1.8289144452
2.6578288904
4.3156577808
7.6313155616
1.6330840889
2.2661681778
3.5323363555
6.0646727111
1.4310508999
1.8621017998
2.7242035996
4.4484071992
7.8968143984
1.2930554984
1.5861109968
2.1722219935
3.3444439870
5.6888879741
3.2134833515
5.4269667030
6.2314374153
5.4035929665
1.2495370120
1.4990740240
1.9981480479
2.9962960959
4.9925921918
2.9894844357
4.9789688713
1.6290519950
2.2581039900
3.5162079800
6.0324159600
4.39222...

Input:
499999
1 1
1 2
1 3
1 2
1 5
1 6
1 7
1 4
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 1
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 11
1 31
1 32
1 33
1 11
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 30
1 43
1 44
1 45
1 46
1 47
1 4
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 4
1 58
1 59
1 60
1 1
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 4
1 72
1 73
1 74
1 75
1 76
1 77
1 34
1 79
1 11
1 81
1 82
1 83
1 84
1 85
1 86
1...

Output:
5.0507575129
5.5731461461
2.7087024251
4.4174048503
1.1951757054
1.3903514108
1.7807028215
2.5614056431
1.9245221262
2.8490442524
4.6980885048
1.0083620066
1.0167240133
1.0334480265
1.0668960531
1.1337921061
1.2675842123
1.5351684245
2.0703368490
3.1406736981
1.0064142144
1.0128284287
1.0256568575
1.0513137150
1.1026274299
1.2052548599
1.4105097198
1.8210194396
2.6420388791
4.2840777582
1.4980927496
1.9961854992
2.9923709984
4.9847419967
1.0270053541
1.0540107082
1.10802...

Output:
5.05075751
5.57314615
2.70870243
4.41740485
1.19517571
1.39035141
1.78070282
2.56140564
1.92452213
2.84904425
4.69808850
1.00836201
1.01672401
1.03344803
1.06689605
1.13379211
1.26758421
1.53516842
2.07033685
3.14067370
1.00641421
1.01282843
1.02565686
1.05131371
1.10262743
1.20525486
1.41050972
1.82101944
2.64203888
4.28407776
1.49809275
1.99618550
2.99237100
4.98474200
1.02700535
1.05401071
1.10802142
1.21604283
1.43208567
1.86417133
2.72834266
4.45668533
1.10901...

Input:
499999
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 16
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 24
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 1
1 48
1 49
1 51
1 52
1 49
1 54
1 55
1 53
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 1
1 72
1 73
1 74
1 75
1 76
1 56
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 86...

Output:
5.4964520492
1.0002319636
1.0004639273
1.0009278546
1.0018557091
1.0037114183
1.0074228365
1.0148456731
1.0296913462
1.0593826923
1.1187653847
1.2375307693
1.4750615387
1.9501230773
2.9002461546
4.8004923092
1.0295402523
1.0590805046
1.1181610093
1.2363220185
1.4726440371
1.9452880742
2.8905761484
4.7811522968
1.0002795821
1.0005591642
1.0011183283
1.0022366567
1.0044733134
1.0089466267
1.0178932535
1.0357865069
1.0715730138
1.1431460276
1.2862920552
1.5725841105
2.14516...

Output:
5.49645205
1.00023196
1.00046393
1.00092785
1.00185571
1.00371142
1.00742284
1.01484567
1.02969135
1.05938269
1.11876538
1.23753077
1.47506154
1.95012308
2.90024615
4.80049231
1.02954025
1.05908050
1.11816101
1.23632202
1.47264404
1.94528807
2.89057615
4.78115230
1.00027958
1.00055916
1.00111833
1.00223666
1.00447331
1.00894663
1.01789325
1.03578651
1.07157301
1.14314603
1.28629206
1.57258411
2.14516822
3.29033644
1.00520342
1.01040683
1.02081367
1.04162734
1.08325...

Input:
499999
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 1
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 8...

Output:
4.2793695663
1.1523755566
1.3047511131
1.6095022262
2.2190044524
1.0280434129
1.0560868258
1.1121736517
1.2243473033
1.4486946066
1.8973892133
2.7947784266
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000001
1.0000000002
1.0000000003
1.0000000007
1.0000000013
1.0000000027
1.0000000053
1.0000000106
1.0000000213
1.0000000426
1.0000000851
1.00000...

Output:
4.27936957
1.15237556
1.30475111
1.60950223
2.21900445
1.02804341
1.05608683
1.11217365
1.22434730
1.44869461
1.89738921
2.79477843
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000001
1.00000001
1.00000002
1.00000004
1.00000009
1.00000017
1.00000034
1.00000068
1.00000136
1.00000272
1.00000545
1.00001...

Input:
499999
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 ...

Output:
3.72558228
1.00004592
1.00009184
1.00018369
1.00036737
1.00073475
1.00146949
1.00293899
1.00587798
1.01175595
1.02351190
1.04702381
1.09404762
1.18809524
1.37619048
1.75238095
2.50476190
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000...

Output:
3.7255822837
1.0000459217
1.0000918434
1.0001836868
1.0003673735
1.0007347470
1.0014694940
1.0029389881
1.0058779762
1.0117559524
1.0235119048
1.0470238095
1.0940476190
1.1880952381
1.3761904762
1.7523809524
2.5047619048
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.00000...

Input:
499999
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 ...

Output:
3.4210777258
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.00000...

Output:
3.42107773
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000...

Input:
499999
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 ...

Output:
2.73666593
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000...

Output:
2.7366659346
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.00000...

Input:
499999
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1 64
1 65
1 66
1 67
1 68
1 69
1 70
1 71
1 72
1 73
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 ...

Output:
3.2114840691
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.0000000000
1.00000...

Output:
3.21148407
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000...

Input:
500000
1 1
1 1
1 3
1 4
2 3
1 4
1 5
1 5
1 6
2 4
2 4
2 4
1 7
1 8
2 7
2 9
1 9
2 9
1 12
1 12
1 13
2 15
2 13
2 13
1 15
1 15
2 16
2 13
2 17
1 17
1 17
1 17
1 20
1 21
1 21
2 23
2 18
1 23
1 23
2 22
2 24
1 25
1 26
1 27
1 26
2 25
1 27
1 30
2 30
2 31
2 27
2 29
2 26
1 31
1 30
2 32
1 32
2 29
2 29
2 31
1 34
2 35
2 30
1 34
2 36
2 35
2 34
1 36
2 34
2 34
1 35
1 37
1 38
2 35
1 40
2 39
1 40
1 40
2 43
2 41
2 42
2 40
2 40
1 42
2 43
2 44
1 42
...

Output:
0.75000000
1.28125000
1.28125000
1.28125000
0.50000000
0.00000000
0.50000000
0.00000000
0.50000000
0.50000000
0.00000000
0.87500000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
1.00000000
0.50000000
0.00000000
1.00000000
0.00000000
1.25000000
0.00000000
0.00000000
0.00000000
0.75000000
0.00000000
1.18750000
0.00000000
0.00000000
0.75000000
1.00000000
1.00000000
0.75000000
0.00000000
0.00000000
0.00000000
0.00000000
0.87500000
0.87500000
0.00000000
0.00000...

Output:
0.7500000000
1.2812500000
1.2812500000
1.2812500000
0.5000000000
0.0000000000
0.5000000000
0.0000000000
0.5000000000
0.5000000000
0.0000000000
0.8750000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
1.0000000000
0.5000000000
0.0000000000
1.0000000000
0.0000000000
1.2500000000
0.0000000000
0.0000000000
0.0000000000
0.7500000000
0.0000000000
1.1875000000
0.0000000000
0.0000000000
0.7500000000
1.0000000000
1.0000000000
0.7500000000
0.0000000000
0.00000...

Input:
500000
1 1
1 2
2 2
1 1
2 3
1 4
1 1
1 5
2 6
1 6
1 5
2 3
2 8
1 7
1 6
1 11
1 11
2 9
2 11
2 8
2 11
1 12
1 11
2 4
2 2
1 13
2 10
1 16
1 13
1 16
1 16
1 19
1 21
1 22
2 16
1 23
1 24
2 5
2 12
1 23
1 23
1 23
2 11
1 26
1 29
1 27
1 31
1 29
2 24
2 19
2 13
1 33
2 32
1 32
2 31
2 23
1 32
1 35
1 36
2 29
2 22
1 35
1 37
1 36
2 29
2 26
1 41
1 42
2 37
2 35
2 31
2 25
1 43
2 40
1 40
1 43
2 30
1 45
1 43
2 32
1 48
2 44
1 47
1 48
1 50
1 48
1 53
1...

Output:
0.50000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
0.75000000
0.00000000
0.75000000
1.00000000
0.50000000
0.00000000
1.31250000
1.00000000
0.50000000
1.75292969
0.50000000
1.10058594
1.46264648
0.00000000
0.75000000
1.92578125
1.00000000
1.50488281
1.00000000
1.00000000
0.50000000
1.00000000
1.32812500
0.00000000
0.00000000
0.00000000
1.79907227
0.00000000
0.00000000
0.00000000
1.12500000
0.50000000
0.50000000
0.00000000
0.00000000
0.50000000
0.00000...

Output:
0.5000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.7500000000
0.0000000000
0.7500000000
1.0000000000
0.5000000000
0.0000000000
1.3125000000
1.0000000000
0.5000000000
1.7529296875
0.5000000000
1.1005859375
1.4626464844
0.0000000000
0.7500000000
1.9257812500
1.0000000000
1.5048828125
1.0000000000
1.0000000000
0.5000000000
1.0000000000
1.3281250000
0.0000000000
0.0000000000
0.0000000000
1.7990722656
0.0000000000
0.0000000000
0.0000000000
1.12500...

Input:
500000
1 1
1 2
2 2
2 1
1 3
1 1
2 1
2 4
2 4
2 1
1 5
2 5
1 6
1 6
1 5
2 2
1 4
2 3
2 1
1 5
2 10
2 2
1 6
2 11
2 2
2 2
2 2
1 9
1 12
1 12
1 10
1 10
2 2
2 3
1 10
2 8
2 8
1 12
1 14
1 16
2 10
1 13
1 17
2 15
1 19
2 12
2 5
1 16
2 21
2 19
1 18
2 19
2 17
2 13
1 16
1 18
1 20
1 21
2 9
1 22
1 21
1 28
2 18
2 3
1 30
2 4
1 34
2 1
2 12
1 25
2 14
1 33
2 12
2 30
2 12
1 37
1 33
2 38
1 36
2 6
1 31
2 8
1 38
2 30
2 1
2 24
2 2
2 3
2 42
1 35
2 1...

Output:
0.50000000
0.75000000
1.12500000
0.00000000
0.00000000
1.12500000
0.50000000
0.75000000
0.75000000
1.63281250
0.00000000
0.87500000
0.00000000
0.87500000
0.87500000
0.87500000
0.96875000
0.93750000
0.00000000
0.00000000
1.12500000
0.00000000
1.31250000
1.87890625
0.00000000
0.50000000
0.50000000
0.50000000
0.50000000
0.75000000
1.00000000
1.22509766
1.48144531
2.13441658
1.43750000
0.75000000
1.43750000
0.75000000
1.43750000
0.00000000
1.59375000
0.00000000
0.75000...

Output:
0.5000000000
0.7500000000
1.1250000000
0.0000000000
0.0000000000
1.1250000000
0.5000000000
0.7500000000
0.7500000000
1.6328125000
0.0000000000
0.8750000000
0.0000000000
0.8750000000
0.8750000000
0.8750000000
0.9687500000
0.9375000000
0.0000000000
0.0000000000
1.1250000000
0.0000000000
1.3125000000
1.8789062500
0.0000000000
0.5000000000
0.5000000000
0.5000000000
0.5000000000
0.7500000000
1.0000000000
1.2250976562
1.4814453125
2.1344165802
1.4375000000
0.7500000000
1.43750...

Input:
500000
1 1
1 2
1 2
1 4
1 1
1 6
1 7
2 3
1 1
2 1
1 8
2 1
2 3
1 1
2 7
2 9
1 2
2 8
1 2
1 8
1 13
1 9
2 9
2 4
1 4
2 5
2 11
2 1
1 14
1 14
2 10
1 13
1 8
2 5
2 13
2 2
2 14
2 20
2 6
2 19
1 4
1 12
2 17
1 12
1 21
1 5
2 14
1 22
1 4
1 25
1 26
1 28
2 16
1 27
1 32
2 4
2 25
1 8
2 17
1 6
1 6
1 13
1 13
2 19
1 21
1 20
2 19
2 39
1 33
2 4
1 20
1 22
1 20
2 16
1 28
1 16
1 18
1 38
2 1
2 21
2 46
1 43
2 1
1 27
1 26
2 6
1 43
2 13
1 27
1 29
1 50...

Output:
0.0000000000
1.6406250000
1.7031250000
0.0000000000
0.7500000000
0.0000000000
0.5000000000
0.5000000000
0.5000000000
0.0000000000
0.0000000000
2.0898437500
0.0000000000
0.0000000000
0.7500000000
1.5468750000
0.7500000000
0.0000000000
1.0625000000
0.0000000000
0.0000000000
0.7500000000
0.0000000000
1.8125000000
0.5000000000
0.0000000000
0.0000000000
0.0000000000
0.0000000000
1.8437500000
0.0000000000
2.8013395667
1.0000000000
0.0000000000
2.8202852607
1.5703125000
1.51562...

Output:
0.00000000
1.64062500
1.70312500
0.00000000
0.75000000
0.00000000
0.50000000
0.50000000
0.50000000
0.00000000
0.00000000
2.08984375
0.00000000
0.00000000
0.75000000
1.54687500
0.75000000
0.00000000
1.06250000
0.00000000
0.00000000
0.75000000
0.00000000
1.81250000
0.50000000
0.00000000
0.00000000
0.00000000
0.00000000
1.84375000
0.00000000
2.80133957
1.00000000
0.00000000
2.82028526
1.57031250
1.51562500
0.75000000
2.87726337
0.50000000
2.66447449
1.84375000
1.58593...

Input:
500000
2 1
2 1
2 1
1 1
1 1
1 1
1 2
1 4
2 6
2 4
1 1
1 5
1 8
2 3
2 1
1 3
1 9
1 6
2 2
1 9
1 8
1 6
2 5
2 9
2 8
2 9
1 2
1 9
1 8
1 12
1 18
1 9
1 7
1 3
1 23
1 8
1 20
1 13
1 1
1 3
1 9
2 20
1 3
1 13
2 6
1 4
1 15
2 17
1 25
1 29
1 35
1 34
1 9
1 7
2 9
2 14
1 31
2 25
2 41
2 16
1 27
1 16
2 13
2 13
2 25
1 10
1 25
1 31
1 19
1 3
1 36
2 42
1 39
2 35
2 18
1 6
1 19
1 23
1 31
2 32
2 31
1 39
1 46
2 6
1 28
2 3
1 22
2 27
1 35
2 56
1 39
1 6...

Output:
0.0000000000
0.0000000000
0.0000000000
0.0000000000
0.5000000000
0.0000000000
1.5625000000
0.9375000000
1.0625000000
0.7500000000
1.1250000000
0.7500000000
0.5000000000
1.0000000000
0.0000000000
1.3593750000
0.0000000000
0.7500000000
0.0000000000
0.0000000000
1.0000000000
1.0000000000
0.7500000000
0.0000000000
0.5000000000
0.7500000000
0.0000000000
0.8750000000
1.6015625000
2.0053710938
0.5000000000
0.0000000000
0.5000000000
0.0000000000
0.0000000000
0.0000000000
0.00000...

Output:
0.00000000
0.00000000
0.00000000
0.00000000
0.50000000
0.00000000
1.56250000
0.93750000
1.06250000
0.75000000
1.12500000
0.75000000
0.50000000
1.00000000
0.00000000
1.35937500
0.00000000
0.75000000
0.00000000
0.00000000
1.00000000
1.00000000
0.75000000
0.00000000
0.50000000
0.75000000
0.00000000
0.87500000
1.60156250
2.00537109
0.50000000
0.00000000
0.50000000
0.00000000
0.00000000
0.00000000
0.00000000
0.00000000
1.96972656
2.06787109
0.00000000
1.00000000
2.06787...

Input:
500000
1 1
1 2
1 1
1 4
1 1
1 6
1 1
1 8
1 1
1 10
1 1
1 12
1 1
1 14
1 1
1 16
1 1
1 18
1 1
1 20
1 1
1 22
1 1
1 24
1 1
1 26
1 1
1 28
1 1
1 30
1 1
1 32
1 1
1 34
1 1
1 36
1 1
1 38
1 1
1 40
1 1
1 42
1 1
1 44
1 1
1 46
1 1
1 48
1 1
1 50
1 1
1 52
1 1
1 54
1 1
1 56
1 1
1 58
1 1
1 60
1 1
1 62
1 1
1 64
1 1
1 66
1 1
1 68
1 1
1 70
1 1
1 72
1 1
1 74
1 1
1 76
1 1
1 78
1 1
1 80
1 1
1 82
1 1
1 84
1 1
1 86
1 1
1 88
1 1
1 90
1 1
1 92
1...

Output:
2.0000000000
2.1250000000
2.2343750000

Output:
2.00000000
2.12500000
2.23437500

Input:
500000
1 1
1 2
1 3
1 1
1 5
1 6
1 1
1 8
1 9
1 1
1 11
1 12
1 1
1 14
1 15
1 1
1 17
1 18
1 1
1 20
1 21
1 1
1 23
1 24
1 1
1 26
1 27
1 1
1 29
1 30
1 1
1 32
1 33
1 1
1 35
1 36
1 1
1 38
1 39
1 1
1 41
1 42
1 1
1 44
1 45
1 1
1 47
1 48
1 1
1 50
1 51
1 1
1 53
1 54
1 1
1 56
1 57
1 1
1 59
1 60
1 1
1 62
1 63
1 1
1 65
1 66
1 1
1 68
1 69
1 1
1 71
1 72
1 1
1 74
1 75
1 1
1 77
1 78
1 1
1 80
1 81
1 1
1 83
1 84
1 1
1 86
1 87
1 1
1 89
1 90
...

Output:
3.0625000000
3.0625000000
3.1210937500
3.1210937500

Output:
3.06250000
3.06250000
3.12109375
3.12109375

Input:
500000
1 1
1 2
1 3
1 4
1 1
1 6
1 7
1 8
1 1
1 10
1 11
1 12
1 1
1 14
1 15
1 16
1 1
1 18
1 19
1 20
1 1
1 22
1 23
1 24
1 1
1 26
1 27
1 28
1 1
1 30
1 31
1 32
1 1
1 34
1 35
1 36
1 1
1 38
1 39
1 40
1 1
1 42
1 43
1 44
1 1
1 46
1 47
1 48
1 1
1 50
1 51
1 52
1 1
1 54
1 55
1 56
1 1
1 58
1 59
1 60
1 1
1 62
1 63
1 64
1 1
1 66
1 67
1 68
1 1
1 70
1 71
1 72
1 1
1 74
1 75
1 76
1 1
1 78
1 79
1 80
1 1
1 82
1 83
1 84
1 1
1 86
1 87
1 88
1 1...

Output:
4.0000000000
4.0000000000
4.0312500000
4.0312500000
4.0615234375
4.0908508301

Output:
4.00000000
4.00000000
4.03125000
4.03125000
4.06152344
4.09085083

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 1
1 7
1 8
1 9
1 10
1 1
1 12
1 13
1 14
1 15
1 1
1 17
1 18
1 19
1 20
1 1
1 22
1 23
1 24
1 25
1 1
1 27
1 28
1 29
1 30
1 1
1 32
1 33
1 34
1 35
1 1
1 37
1 38
1 39
1 40
1 1
1 42
1 43
1 44
1 45
1 1
1 47
1 48
1 49
1 50
1 1
1 52
1 53
1 54
1 55
1 1
1 57
1 58
1 59
1 60
1 1
1 62
1 63
1 64
1 65
1 1
1 67
1 68
1 69
1 70
1 1
1 72
1 73
1 74
1 75
1 1
1 77
1 78
1 79
1 80
1 1
1 82
1 83
1 84
1 85
1 1
1 87
1 88
...

Output:
5.0000000000
5.0000000000
5.0000000000
5.0000000000
5.0000000000
5.0000000000
5.0000000000
5.0000000000

Output:
5.00000000
5.00000000
5.00000000
5.00000000
5.00000000
5.00000000
5.00000000
5.00000000

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 1
1 8
1 9
1 10
1 11
1 12
1 1
1 14
1 15
1 16
1 17
1 18
1 1
1 20
1 21
1 22
1 23
1 24
1 1
1 26
1 27
1 28
1 29
1 30
1 1
1 32
1 33
1 34
1 35
1 36
1 1
1 38
1 39
1 40
1 41
1 42
1 1
1 44
1 45
1 46
1 47
1 48
1 1
1 50
1 51
1 52
1 53
1 54
1 1
1 56
1 57
1 58
1 59
1 60
1 1
1 62
1 63
1 64
1 65
1 66
1 1
1 68
1 69
1 70
1 71
1 72
1 1
1 74
1 75
1 76
1 77
1 78
1 1
1 80
1 81
1 82
1 83
1 84
1 1
1 86
1 87
1 8...

Output:
6.00000000
6.00000000
6.00000000
6.00000000
6.00000000
6.00000000
6.00000000

Output:
6.0000000000
6.0000000000
6.0000000000
6.0000000000
6.0000000000
6.0000000000
6.0000000000

Input:
500000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 1
1 9
1 10
1 11
1 12
1 13
1 14
1 1
1 16
1 17
1 18
1 19
1 20
1 21
1 1
1 23
1 24
1 25
1 26
1 27
1 28
1 1
1 30
1 31
1 32
1 33
1 34
1 35
1 1
1 37
1 38
1 39
1 40
1 41
1 42
1 1
1 44
1 45
1 46
1 47
1 48
1 49
1 1
1 51
1 52
1 53
1 54
1 55
1 56
1 1
1 58
1 59
1 60
1 61
1 62
1 63
1 1
1 65
1 66
1 67
1 68
1 69
1 70
1 1
1 72
1 73
1 74
1 75
1 76
1 77
1 1
1 79
1 80
1 81
1 82
1 83
1 84
1 1
1 86
1 87
1...

Output:
7.0000000000
7.0000000000
7.0000000000
7.0000000000
7.0000000000
7.0000000000
7.0000000000
7.0000000000
7.0000000000
7.0000000000
7.0000000000
7.0000000000
7.0000000000

Output:
7.00000000
7.00000000
7.00000000
7.00000000
7.00000000
7.00000000
7.00000000
7.00000000
7.00000000
7.00000000
7.00000000
7.00000000
7.00000000


The only line of the input contains three integers n, p and q (1 ≤ n ≤ 109, 1 ≤ p ≤ 130, 1 ≤ q ≤ 2 000 000) — the number of bears, the number of places to sleep and the number of scenarios, respectively.

NoteIn the first sample, there are 5 bears and only 1 place to sleep. We have R1 = 6, R2 = 11, R3 = 16 so the answer is . Let's analyze the optimal strategy for scenario with 2 days. There are R2 = 11 barrels and 10 of them contain juice.  In the first night, the i-th bear chooses a barrel i only.   If one of the first 5 barrels contains wine then one bear goes to sleep. Then, bears win because they know where wine is and there is at least one awake bear.  But let's say none of the first 5 barrels contains wine. In the second night, the i-th bear chooses a barrel 5 + i.   If one of barrels 6 – 10 contains wine then one bear goes to sleep. And again, bears win in such a situation.  If nobody went to sleep then wine is in a barrel 11.   In the second sample, there is only one bear. He should choose an empty set of barrels in each night. Otherwise, he would maybe get wine and bears would lose (because there must be at least one awake bear). So, for any number of days we have Ri = 1. The answer is .

There are n bears in the inn and p places to sleep. Bears will party together for some number of nights (and days).Bears love drinking juice. They don't like wine but they can't distinguish it from juice by taste or smell.A bear doesn't sleep unless he drinks wine. A bear must go to sleep a few hours after drinking a wine. He will wake up many days after the party is over.Radewoosh is the owner of the inn. He wants to put some number of barrels in front of bears. One barrel will contain wine and all other ones will contain juice. Radewoosh will challenge bears to find a barrel with wine.Each night, the following happens in this exact order:  Each bear must choose a (maybe empty) set of barrels. The same barrel may be chosen by many bears.  Each bear drinks a glass from each barrel he chose.  All bears who drink wine go to sleep (exactly those bears who chose a barrel with wine). They will wake up many days after the party is over. If there are not enough places to sleep then bears lose immediately. At the end, if it's sure where wine is and there is at least one awake bear then bears win (unless they have lost before because of the number of places to sleep).Radewoosh wants to allow bears to win. He considers q scenarios. In the i-th scenario the party will last for i nights. Then, let Ri denote the maximum number of barrels for which bears surely win if they behave optimally. Let's define . Your task is to find , where  denotes the exclusive or (also denoted as XOR).Note that the same barrel may be chosen by many bears and all of them will go to sleep at once.

Input: 5 1 3

Output: 32

Input: 1 100 4

Output: 4

Input: 3 2 1

Output: 7

Input: 100 100 100

Output: 381863924

Input: 1 1 10

Output: 11

Input: 2 1 10

Output: 217

Input: 1 2 10

Output: 11

Input: 6 3 5

Output: 10556

Input: 3 6 5

Output: 381

Input: 1000000000 130 2

Output: 2709862311

Input: 999888777 3 2000000

Output: 3738496384

Input: 1 1 1

Output: 1

Input: 1 1 2000000

Output: 2000000

Input: 1000000000 1 1

Output: 1000000001

Input: 1 130 1

Output: 1

Input: 1 130 2000000

Output: 2000000

Input: 938000123 130 50

Output: 940712963

Input: 1000000000 115 1500000

Output: 282206304

Input: 1000000000 130 1682958

Output: 1910910795

Input: 1000000000 130 1800000

Output: 2109423040

Input: 1000000000 15 2000000

Output: 3184702592

Input: 1000000000 127 2000000

Output: 2372670592

Input: 923853923 130 2000000

Output: 352856832

Input: 132234292 128 2000000

Output: 3777389696

Input: 712349213 130 2000000

Output: 2509079296

Input: 999999999 129 1999999

Output: 1573786240

Input: 38143571 123 1999999

Output: 1605192064

Input: 128381 130 2000000

Output: 1377133056

Input: 1000000000 130 2000000

Output: 1136719232

Input: 123821373 130 2000000

Output: 364091136

Input: 130 130 2000000

Output: 3255601024

Input: 129 130 2000000

Output: 416078592

Input: 17 130 2000000

Output: 3068230400


The first line of the input contains two integers n and k (1 ≤ n, k ≤ 100 000) — the number of cows and the length of Farmer John's nap, respectively.

NoteIn the first sample, the Mischievous Mess Makers can swap the cows in the stalls 1 and 5 during the first minute, then the cows in stalls 2 and 4 during the second minute. This reverses the arrangement of cows, giving us a total messiness of 10.In the second sample, there is only one cow, so the maximum possible messiness is 0.

Output a single integer, the maximum messiness that the Mischievous Mess Makers can achieve by performing no more than k swaps.

It is a balmy spring afternoon, and Farmer John's n cows are ruminating about link-cut cacti in their stalls. The cows, labeled 1 through n, are arranged so that the i-th cow occupies the i-th stall from the left. However, Elsie, after realizing that she will forever live in the shadows beyond Bessie's limelight, has formed the Mischievous Mess Makers and is plotting to disrupt this beautiful pastoral rhythm. While Farmer John takes his k minute long nap, Elsie and the Mess Makers plan to repeatedly choose two distinct stalls and swap the cows occupying those stalls, making no more than one swap each minute.Being the meticulous pranksters that they are, the Mischievous Mess Makers would like to know the maximum messiness attainable in the k minutes that they have. We denote as pi the label of the cow in the i-th stall. The messiness of an arrangement of cows is defined as the number of pairs (i, j) such that i < j and pi > pj.

Input: 5 2

Output: 10

Input: 1 10

Output: 0

Input: 100000 2

Output: 399990

Input: 1 1

Output: 0

Input: 8 3

Output: 27

Input: 7 1

Output: 11

Input: 100000 40000

Output: 4799960000

Input: 1 1000

Output: 0

Input: 100 45

Output: 4905

Input: 9 2

Output: 26

Input: 456 78

Output: 58890

Input: 100000 50000

Output: 4999950000

Input: 100000 50001

Output: 4999950000

Input: 100000 50002

Output: 4999950000

Input: 100000 50003

Output: 4999950000

Input: 100000 49998

Output: 4999949994

Input: 100000 49997

Output: 4999949985

Input: 99999 49998

Output: 4999849998

Input: 99999 49997

Output: 4999849991

Input: 99999 49996

Output: 4999849980

Input: 99999 50000

Output: 4999850001

Input: 99999 50001

Output: 4999850001

Input: 99999 50002

Output: 4999850001

Input: 30062 9

Output: 540945

Input: 13486 3

Output: 80895

Input: 29614 7

Output: 414491

Input: 13038 8

Output: 208472

Input: 96462 6

Output: 1157466

Input: 22599 93799

Output: 255346101

Input: 421 36817

Output: 88410

Input: 72859 65869

Output: 2654180511

Input: 37916 5241

Output: 342494109

Input: 47066 12852

Output: 879423804

Input: 84032 21951

Output: 2725458111

Input: 70454 75240

Output: 2481847831

Input: 86946 63967

Output: 3779759985

Input: 71128 11076

Output: 1330260828

Input: 46111 64940

Output: 1063089105

Input: 56500 84184

Output: 1596096750

Input: 60108 83701

Output: 1806455778

Input: 1 2

Output: 0

Input: 1 3

Output: 0

Input: 1 4

Output: 0

Input: 1 5

Output: 0

Input: 1 6

Output: 0

Input: 2 1

Output: 1

Input: 2 2

Output: 1

Input: 2 3

Output: 1

Input: 2 4

Output: 1

Input: 2 5

Output: 1

Input: 3 1

Output: 3

Input: 3 2

Output: 3

Input: 3 3

Output: 3

Input: 3 4

Output: 3

Input: 3 5

Output: 3

Input: 4 1

Output: 5

Input: 4 2

Output: 6

Input: 4 3

Output: 6

Input: 4 4

Output: 6

Input: 4 5

Output: 6

Input: 5 1

Output: 7

Input: 5 3

Output: 10

Input: 5 4

Output: 10

Input: 5 5

Output: 10

Input: 6 1

Output: 9

Input: 6 2

Output: 14

Input: 6 3

Output: 15

Input: 7 2

Output: 18

Input: 7 3

Output: 21

Input: 7 4

Output: 21

Input: 10 2

Output: 30

Input: 60982 2

Output: 243918

Input: 23426 23

Output: 1076515

Input: 444 3

Output: 2643

Input: 18187 433

Output: 15374531

Input: 6895 3544

Output: 23767065

Input: 56204 22352

Output: 1513297456

Input: 41977 5207

Output: 382917573

Input: 78147 2321

Output: 351981971

Input: 99742 62198

Output: 4974183411

Input: 72099 38339

Output: 2599096851

Input: 82532 4838

Output: 751762306

Input: 79410 33144

Output: 3066847464

Input: 11021 3389

Output: 51726307

Input: 66900 7572

Output: 898455660

Input: 99999 49999

Output: 4999850001

Input: 100000 49999

Output: 4999949999

Input: 100000 100000

Output: 4999950000

Input: 100000 1

Output: 199997

Input: 4 100

Output: 6

Input: 100000 1234

Output: 243753254