시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 512 MB111100.000%

## 문제

As we all know, Earth is a unlimited plane in a 3D space and the sun is just a tiny ball shining evenly in all directions, for simplicity represented as a single point in a 3D space. One day the Death Star comes. The Death Star is a sphere with radius $R$. Because it is really big, some area on Earth was covered by the shadow. Your task is to calculate the area of the shadow, given the initial positions of Earth, the Death Star and the sun.

## 입력

In the first line one integer $Z \le 10^4$ is given, denoting number of testcases described in following lines.

The first line of each test case contains three integers $X_s$, $Y_s$, $Z_s$ meaning the initial sun coordinates. The second line contains four integers $X_d$, $Y_d$, $Z_d$ and $R$ meaning the position of the center of the Death Star and its radius. The third and last line contains four integers $A$, $B$, $C$ and $D$ meaning that Earth is a plane consisting of points $(x, y, z)$ such that $Ax + By + Cz + D = 0$. You may assume that Earth, the Death Star and the sun are disjoint (they have no common points) and that the answer is greater than $0$ and not infinity.

## 출력

For each test case, the first and only line of the standard output should contain one real number, meaning the area of the shadow cast by the Death Star on Earth. Your answer will be accepted, if the relative or absolute error will not exceed $10^{-6}$.

## 제한

• $X_s, Y_s, Z_s \in [-10^4, 10^4]$
• $X_d, Y_d, Z_d \in [-10^4, 10^4]$, $R \in [1, 10^4]$
• $A, B, C, D \in [-10^4, 10^4]$

## 예제 입력 1

2
0 0 0
0 0 5 3
0 0 5 -50
0 0 0
6 8 0 6
6 8 0 -180


## 예제 출력 1

176.714586764
572.555261117


## 예제 입력 2

1
3 1 2
5 -1 4 2
2 -1 1 -22


## 예제 출력 2

77.432452329