Largest inscribed rectangle

No attempts yetTime limit2sMemory limit256 MB

Problem

A rectangle is inscribed in a circle of radius RR when all four of its corners lie on the circle. Find the largest area of an inscribed rectangle whose shorter side is at most BB. A square counts as a rectangle.

Input

The first line contains an integer TT, the number of test cases (1T10001 \le T \le 1000). Each of the next TT lines contains two integers RR and BB separated by a space (1R,B100001 \le R, B \le 10000).

Output

For each test case print the maximum area on its own line, rounded to three digits after the decimal point. Always print exactly three digits after the decimal point.