Problem F
The Grazing Cow
Input: standard input
Output: standard output
Time Limit: 1 second

 

A cow is grazing in the field. A rope in the field is tied with two pillars. The cow is kept tied with the rope with the help of a ring. So the cow can be considered to be tied with any point of the rope. Your job is to find the area of the field where the cow can reach and eat grass. If required assume that pi = 2*cos-1(0) (Here angle is measured in radians). You can also assume that the thickness of the rope is zero, the cow is a point object and the radius of the ring and the thickness of the pillars are negligible. Please use double precision floating-point data type for floating-point calculations.

 

Input

First line of the input file contains an integer (N<=100), which indicates how many sets of inputs are there. Each of the next N lines contains two integers D(0<=D<=1000) and L(D<L<=1500). The first integer D denotes the distance in feet between the two pillars and the second integer L denotes the length of the rope in feet.

 

Output

Your program should produce N lines of output. Each line contains a single floating-point number, which has three digits after the decimal point. This floating-point number indicates the area of the field which the cow can reach and eat grass.

 

Sample Input                           Output for Sample Input

3

10 12

23 45

12 18

62.517

1366.999

189.670

 


Problem setter: Shahriar Manzoor, Member of Elite Problemsetters' Panel

Special Thanks: Monirul Hasan, Member of Elite Problemsetters' Panel