Tom and Jerry

Tom runs from the center at speed V straight toward Jerry, who circles radius R at the same speed, so compute the catch time per test case.

Medium7MathGeometryNo attempts yetTime limit2sMemory limit256 MB

Problem

Tom and Jerry are playing another round of chase. The rules today are a little unusual, but the goal is the same as always. Jerry runs, and Tom has to catch him.

Jerry runs along a perfect circle of radius RR meters at a constant speed of VV meters per second. Tom starts at the exact center of that circle. He wants to catch Jerry as soon as he can, but he never works out which direction would be fastest. He simply runs straight at whatever point Jerry occupies at that instant.

Because Jerry keeps moving, the track Tom leaves behind bends into a curve, as in the picture. At every moment Tom lies on the segment joining the center of the circle to Jerry's current position. Tom runs at a constant speed of VV meters per second, the same speed as Jerry. Find how many seconds Tom needs to catch Jerry.

Input

The first line contains the number of test cases TT (1T100001 \le T \le 10000).

Each of the next TT lines contains two integers RR and VV (1R,V100001 \le R, V \le 10000), the radius of the circle in meters and the speed shared by Tom and Jerry in meters per second.

Output

For each test case, print one line in the form Case x: y, where xx is the test case number starting at 1 and yy is the time in seconds that Tom needs to catch Jerry.

Round yy to eight digits after the decimal point and print all eight of them.