You can arrange the gears and axles in any order. What is the maximum rate at which the last gear/axle in sequence spins that you can achieve? Because this may be large, output the natural log of the value.
The first line of input contains a single integer $n$ ($0 \le n \le 10^5$) denoting the number of gears.
Each of the next $n$ lines contains two integers $s$ ($1 \le s \le 10^5$) and $c$ ($3 \le c \le 10^5$), one for each gear in your collection, where $s$ is the size of the teeth of the gear and $c$ is the count of the number of teeth.
Output a single line with a single number equal to the natural log of the maximum angular speed you can achieve with your motor and axles and gears in your collection. This output will be considered correct if it is within an absolute or relative error of $10^{-6}$ .
Sample Input 1 | Sample Output 1 |
---|---|
6 19 364 21 1023 19 66 19 242 21 807 19 675 |
2.9704451880078357 |
Sample Input 2 | Sample Output 2 |
---|---|
4 33 10 33 27 44 10 44 27 |
1.9865035460205664 |