UFO
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

One night, Xiaoming was looking at the sky with a telescope. Suddenly, he saw two UFOs!

We regard the ground as an infinite 2D space. Each UFO shines a circle onto the ground. The first circle has a radius of r_1, and the second has a radius of r_2.

Xiaoming saw that the two UFOs were moving in a line, flat with the ground. To be exact, the center of the first UFO's circle starts at the point (x_1, y_1) and moves in a straight line to the point (x_1', y_1') at a speed of v_1 every second. In the same way, the center of the second UFO's circle starts at (x_2, y_2) and moves in a straight line to (x_2', y_2') at a speed of v_2 every second. The two UFOs start moving at the same time, and they stop moving when they reach their end points.

Note that it is possible of the start and end points being the same. If they are, the circle stays in the same place.

The circles from the two UFOs might overlap at some points in time. Xiaoming wants to know: What is the biggest area where the circles overlap? If the circles never overlap, the overlapping area is 0.

输入描述:

The first line has an integer T (1 \le T \le 10^4), denoting the number of test cases.

For each test case, there are three lines:

- The first line has two integers r_1, r_2 (1 \le r_1, r_2 \le 100), denothing the radius of the two circles respectively.
- The second line has five integers v_1, x_1, y_1, x_1', y_1' (1 \le v_1 \le 100, |x_1|, |y_1|, |x_1'|, |y_1'| \le 100). These are the speed of the first UFO, and the start and end points of its circle.
- The third line has five integers v_2, x_2, y_2, x_2', y_2' (1 \le v_2 \le 100, |x_2|, |y_2|, |x_2'|, |y_2'| \le 100). These are the speed of the second UFO, and the start and end points of its circle.

输出描述:

For each test case, print one real number, denoting the biggest area where the circles overlap. Your answer will be regarded as correct if the absolute or relative error of the jury's answer is not bigger than 10^{-4}.
示例1

输入

复制
5
1 1
1 1 3 2 1
1 0 0 4 0
1 1
1 1 3 3 -1
1 0 0 4 0
1 2
1 1 3 3 -1
1 0 0 4 0
35 36
5 20 -20 -20 20
1 10 -10 21 -22
35 36
1 20 -20 -20 20
1 -20 -20 21 -22

输出

复制
1.180982812
1.721131763
3.141592654
3848.451000647
2817.357716841

备注:

For the first test case, the following figure shows the beginning coordinates of the two circles.



After \sqrt{5} seconds, it gets the biggest overlapping area, which is showed by the following figure.