Limits 2s, 512 MB

One day the author imagined an analog clock with minute and hour arms. The thought was simple: if we consider the two arms as two sides of a triangle and join the separate ends of the arms for the third side of the triangle, then at different times throughout the day and night, the area of the triangle varies. A natural question then arises, given the lengths of minute and hour arms, what is the maximum area of the triangle?

In this picture, the blue line segments represent minute and hour arms, and the red line segment represents the third side of the triangle.

Input

The first line of the input represents the number of test cases T(0<T<500001)T ( 0 < T < 500001). The following TT lines each contain two floating point numbers aa and b(0<a,b108)b (0 < a, b \leq 10^8) representing the length of the hour and the minute arms, respectively.

Output

For each case, print the maximum area that can be achieved at some position of the hour and minute arms as described above. Errors less than 10610^{-6} will be ignored.

Sample

InputOutput
1
661.5611881304 354.5250382063
117270.002748868

Submit

Login to submit.

Statistics

92% Solution Ratio
Asif_AlimEarliest, Jan '23
JanLitwinFastest, 0.3s
Saeed_adnanLightest, 3.0 MB
Nusab19Shortest, 60B
Toph uses cookies. By continuing you agree to our Cookie Policy.