시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 (추가 시간 없음) 1024 MB0000.000%

문제

Artem and Kostya are playing a following game. Artem has $n$ doors with free ceiling. The floors of the doors are fixed on zero height, ceiling could change. Each door has two parameters $a_i, b_i$: $a_i$ is the initial height of the ceiling, and $b_i$ is the velocity of the ceiling. If $b_i > 0$, then the ceiling is moving up $b_i$ meters per second. If $b_i < 0$, then the ceiling is moving down $-b_i$ meters per second until it becomes zero, after that it stops. And if $b_i = 0$, the ceiling is always fixed at height $a_i$.

The game proceeds as follows: Artem places these $n$ doors at points on $0X$-axis with coordinates $1, 2, \ldots, n$ in some order. Kostya is located at point $x = 0$ just before the game. He chooses some height $h \ge 0$ and velocity $v > 0$ (here we consider Kostya as a point). Then Artem shoots the starting pistol, and the doors' ceilings begin to move and simultaneously Kostya starts his journey on constant height $h$ with constant velocity $v$ in the positive direction of $0X$-axis. Kostya must fly through all the doors. So, if Kostya flies through some coordinate $i$ and the ceiling of the door at coordinate $i$ is strictly down Kostya, then Kostya loses.

To make the game more exciting, Kostya decided to choose a randomized strategy. He chooses the height $h$ as a uniformly distributed on $[0; 10^9]$ real number. Then he chooses some $v > 0$ which allows him to win, if it is possible. For each arrangement of doors consider the probability of Kostya's win if he uses this strategy. Artem wants to place doors in such order that this probability is minimized. Help Artem to find this minimal probability. To make the answer format more convenient, output the desired probability multiplied by $10^9$.

입력

The first line of input contains one positive integer $n$ ($1 \le n \le 5 \cdot 10^5$) --- the number of doors Artem has.

Next $n$ lines contain description of doors, each of them contain two integers $a_i, b_i$ ($1 \le a_i \le 10^9, |b_i| \le 10^9$), denoting the initial height and the velocity of the ceiling of the $i$-th door.

출력

In the only line output a real number --- the minimal probability of Kostya's win, multiplied by $10^9$. The answer will be considered correct if the absolute or relative error is less than $10^{-6}$. Note that this rule applies to the output value, not to the desired probability.

예제 입력 1

3
1 2
3 -2
2 1

예제 출력 1

1.5000000000

예제 입력 2

1
1 2

예제 출력 2

1000000000.0000000000