Limits 500ms, 512 MB

W is working on the field from very beginning of the day. Now he has get tired and taking rest. At that time he started drawing at the ground.

Firstly he draws a circle. Then he draws two tangent from a point C(the two tangent touch the point D and E of the circle) and connects the two points with a line which are touched the circle. It created a chord named DE . Now he is thinking if he knows the shortest distance from the center to the chord AF and half length of DE, Can he find the area of CEBD portion? (B is a random point in DE arc)

After thinking a lot he find the solution. Can you also find a solution?

Input

Input start with an integer T(1<=T<=100), denoting the number of test cases.

Then T lines containing two integers x(1<=x<=10000) and y(1<=y<=10000) where x denotes the length of AF and y denotes half length of DE.

Output

For each case print the are of CEBD. Errors less than 10-6 will be ignored.

Sample

InputOutput
2
4 4
2 2
6.8672587713
1.7168146928

Submit

Login to submit.

Statistics

79% Solution Ratio
bisnu_sarkarEarliest, Aug '20
bisnu_sarkarFastest, 0.0s
bisnu_sarkarLightest, 131 kB
Nusab19Shortest, 101B
Toph uses cookies. By continuing you agree to our Cookie Policy.