E. Shoof Abu Ibrahim
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

One day Abu Shehab heard that his enemies are plotting revenge on him, so he decided to contact his favorite spy to gather intel and do reconnaissances before the enemies attack.

The spy, codenamed Abu Ibrahim, launched Operation Roya. He stole key documents revealing the enemy's infrastructure and discovered that their territory was a regular convex polygon with $$$n$$$ vertices, strictly enclosed by a circle of radius $$$r$$$.

A polygon with 4 vertices inside a circle of radius r.

He reported this to Abu Shehab, who ordered him to continue gathering intel. Abu Ibrahim's mission was clear: infiltrate the enemy territory just once, observe as much as possible, document everything in a single attempt, and escape safely.

He studied the guards' schedule, and Abu Shehab gave him the green light for a single entry at 04:00 A.M. Now, Abu Ibrahim now has a problem, he has to choose exactly one point on the circle that provides the maximal view angle of the polygon so he can see as much as possible.

His objective is to determine the maximum view angle he could achieve from any point on the circle. Given the polygon's vertices and the enclosing circle, what is the largest possible view angle he can obtain?

Input

The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases.

The only line of each test case contains two integers $$$n$$$ ($$$3 \le n \le 10^6$$$) and $$$r$$$ ($$$1 \le r \le 2 \cdot 10^6$$$) — the number of vertices of the polygon and the radius of the circle respectively.

Output

For each test case, print the maximal view angle in radians of the polygon from a point on the circle.

Your answer will be considered correct if its absolute or relative error doesn't exceed $$$10^{-6}$$$.

Example
Input
3
4 13
9 19
3 8
Output
2.356194490
2.792526803
2.094395102