Problem Number Nine and Three Quarter

Limits 1s, 512 MB

Harry is going to start his school at Hogwarts this year. In order to reach Hogwarts, he needs to catch the “Hogwarts Express” and that too from platform number nine and three quarter of the King’s Cross railway station. But, he doesn’t know how far he has to go to reach that peculiar platform.

Assume, King’s Cross is a railway station in a half-circular shape. Harry is standing on the midpoint of diameter ABAB, which is HH. There is a chord BCBC. The bisector BNBN of the angle ABC∠ABC intersects King’s Cross at NN. The midpoint of BCBC is DD. DNDN intersects the perpendicular bisector of the chord ABAB at II, exactly where the platform nine and three quarter is located.

Harry needs to reach II from HH. He only knows the radius of King’s Cross railway station rr, and the value of the angle ABC∠ABC. Help Harry calculate the length of HIHI.

Input

Input starts with an integer TT (T100T ≤ 100), denotes the number of test cases.

Then T lines follow. Each line contains two integers rr (1r1001 ≤ r ≤ 100), denoting the radius of King’s Cross and xx (5x855 ≤ x ≤ 85), denoting the value of angle ABC∠ABC, in degrees.

Output

For each test case, print the length of HIHI. Errors less than 10610^{-6} will be ignored.

Sample

InputOutput
2
10 45
50 30
5.857864
22.400924