Limits 1s, 512 MB

Master Shifu thinks, besides of being a kung fu master, Xiao Po is a Chinese. So, like his country mates he should also be very good at solving problems. Therefore, besides kung fu lessons master Shifu is giving mathematical tasks to Po.

Po is stuck in the following problem and he wants your help to get solve it. Can you help him solving this problem? If you help him he will teach you “Wuxi Finger Hold”.

ABCD is a square which is equally split in four parts. X1-X2 line vertically splits the square equally and Y1-Y2 line horizontally splits the square equally. O is the intersecting point of X1X2 & Y1Y2 and also the center of the large circle. Center of small circle lies on X1X2 line. Large circle is touching all the sides of the square. a is the distance from X1 where small circle intersects X1X2 and b is the distance from Y1 where small circle intersects Y1Y2. The small is touching the X2 point.

You will be given the value of a and b (0<=a, b<=100) . Find the area of the ABCD square. You can safely assume that the figure is valid and result always exists.

Input

The first line of input contains number of test cases (1<=T<= 4167). Each of the next T line contains two space separated integers that denotes the value of a and b.

Output

Print case number and the expected result up according to the sample IO. Your program will be considered correct if the relative or absolute error is at most 1e-6.

Sample

InputOutput
5
5 7
5 6
5 5
5 4
5 3
324.000000
113.777778
100.000000
113.777778
324.000000

This problem was authored for Inter Department Programming Contest 2016 at Jahangirnagar University and is being hosted on Toph per author's request.

Submit

Login to submit.

Statistics

80% Solution Ratio
habib_rahmanEarliest, Feb '16
habib_rahmanFastest, 1200.6s
ChronosLightest, 131 kB
liar_rakibShortest, 425B
Toph uses cookies. By continuing you agree to our Cookie Policy.