Imposing figures#565

Imposing figures

2 seconds
64 megabytes
Hard

Peter cuts cardboard into a circle and a triangle, and Vassya tries to arrange one figure on top of the other in such a way that the area of overlap of the two figures is maximized. Help Vassya.

Input

The first line contains the number of figure pairs (1 \leq T \leq 20). Each of the next lines contains four integers separated by spaces: the lengths of the sides of the triangle , , , and the radius of the circle .

(1 \leq a \leq b \leq c \leq 100,\ 1 \leq R \leq 100,\ a + b > c).

Output

Output numbers found by Vassya (one per line). Output each result with an accuracy of decimal places.

Examples

Example 1

Loading
Loading