There are two circles, both centered at the origin. Circle A has a radius of $a$, and Circle B has a radius of $b$.
Two points are selected uniformly at random within Circle B (meaning every point $(x, y)$ satisfying $x^2+y^2 \le b^2$ has an equal probability of being chosen). You need to find a path from one point to the other without crossing the circumference of Circle A. Calculate the infimum (shortest possible length) of such a path. If no such path exists, this value is defined as $0$.
You need to output the expected value of this path length.
Precision Requirements
Your answer must have a relative or absolute error not exceeding $10^{-3}$ to $10^{-4}$.
Specifically, since the standard solution (model solution) has a relative or absolute error of no more than $10^{-4}$, your answer will be compared against the standard solution's output with a tolerance of $10^{-3}$. Therefore, if the relative or absolute error between your output and the true value falls within the range $(10^{-3}-10^{-4}, 10^{-3}]$, it is possible (but not guaranteed) that your solution will be accepted.
Input
There are multiple test cases in a single test file.
The first line of the input contains an integer $T$, indicating the number of test cases. For each test case, the input contains a single line with two integers $a$ and $b$.
Output
For each test case, output a single line with a single real number, indicating the answer.
Example
Input
3 123 456 456 123 233 333
Output
373.30 111.37 156.84
Scoring
For all test cases, $1 \le T \le 10^5$, $1 \le a, b \le 10^6$
- Subtask 1 (20 points): $T \le 50$, $b \le a$
- Subtask 2 (10 points): $T \le 50$, $a = 1$, $b \ge 10^5$
- Subtask 3 (20 points): $T \le 2$
- Subtask 4 (20 points): $T \le 50$
- Subtask 5 (30 points): No additional constraints.