The queen wants a terrace garden. The garden is one stone in the middle and several rings of stones around it.

The queen has not fixed N and M yet, so she wants the size of the terrace worked out in advance for many combinations. The terrace is the shortest convex boundary that encloses every stone of the outermost ring. That boundary is made of the outer arc of each stone and the segments joining the arc ends of neighboring stones.
For a garden with M rings, find the radius of a stone in the last ring and the perimeter of the terrace.
The first line holds the number of test cases P. (1≤P≤1000)
Each of the next P lines holds the test case number T, the number of stones N in one ring, and the number of rings M, separated by spaces. (3≤N≤20, 1≤M≤15) T is an integer.
For each test case print one line with the test case number T, the radius of a stone in the last ring, and the perimeter of the terrace, separated by single spaces.
Round both real numbers at the fourth decimal place and print three decimal places. Rounding is half up, and an integral value still shows all three decimals. The output must match the answer character for character.
The answer grows as N gets smaller and M gets larger. The radius reaches about 5.6×1014 and the perimeter about 6.9×1015, so double precision alone cannot pin down the third decimal. Compute with higher precision.