Limits 1s, 512 MB

Faisal is a famous ice hockey player. He plays his game all across the world. But his favorite ground is Nirpur's Yellow Cat Stadium. Whenever he plays at this ground, he performs. The Yellow Cat Stadium can be considered as a big circle. The ground is a quadrangle inscribed inside the circle, where the four vertices of the ground lies at the circumference of the stadium.

Figure 1: Yellow Cat Stadium.

In the picture above, the quadrangle ABCDABCD is the area of the ground inside the Yellow Cat Stadium.

Due to the increasing temperature in the City of Dahaka, Yellow Cat Stadium (YCS) is no longer suitable for ice hockey. Thus, Faisal decides to create two grounds by himself, so that he can practice on these two grounds for his upcoming tournaments. Since YCS is his favorite, he wants to create two grounds which are rectangular. The area of them are as follows:

  1. The area of the first ground is AB×DCAB \times DC
  2. The area of the second ground is AD×BCAD \times BC.

In order to find the area of two rectangles, Faisal has appointed Preplanner, a renowned company that will help to get these two grounds ready. He has given the following information of YCS on the picture(Figure 1) above to that company:

In figure 1, There is a line segment with one endpoint AA, on the circle, one endpoint FF outside the circle and one point between these two points intersecting the circle on point EE. There will be another line from the external point FF that touches another point CC that is on the circumference of the circle. The company will be given the length of CFCF, ADAD and EFEF. There is another line XYXY, that touches the circle on point DD. The company will be given three angles BDYBDY, AFCAFC and ABDABD.

You are a new employee of Preplanner. Your boss has given you the task of finding the summation of the area of two of the grounds that Faisal is going to create.

Input

The first line contains an integer TT (1T1051 ≤ T ≤ 10^5), denoting the number of testcases.

The first line of each case contains three real numbers, representing the lengths of ADAD, CFCF and EFEF. All lengths are less than 10810^8.

The next line will have three real numbers, representing the angles ABDABD, BDYBDY and AFCAFC. All the angles will be valid and will be given in degrees and less than 180°180 \degree.

Output

Output a single number, the summation of the areas of the two grounds. The answer should be accurate up to 2 decimal places.

Sample

InputOutput
1
8 5 2.23606797749979
53.130102354156 90 63.434948822922
100

Submit

Login to submit.

Statistics

0% Solution Ratio
Toph uses cookies. By continuing you agree to our Cookie Policy.