시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB111100.000%

문제

Putata is fascinated with playing Zoe these days. Putata is practicing Zoe's ability, paddle star at this moment.

This ability allows Zoe to fire a star that she can redirect in flight. The damage dealt by the star is positively correlated to its flying distance. Formally, assume Zoe is currently at point $X$ and she fires in any direction. At any moment, Zoe can change the direction of the star. If the star is at point $Y$, and the new direction leads to some point $Z$, then the track of the star will be $X\to Y\to Z$. If the star meets any enemy on its trace, it will immediately disappear and cause damage to the enemy.

Since Putata is not skilled enough to control this ability, the stars he fires always fit the following restrictions. The first segment $XY$ always has length $\ell_1$, and the second segment $YZ$ always has length $\ell_2$. Assume Zoe is facing direction $\overrightarrow{XP}$ (which is a certain direction), and let $\langle\overrightarrow{XP},\overrightarrow{XY}\rangle$ be $\theta$ degrees, $\langle\overrightarrow{XY},\overrightarrow{YZ}\rangle$ be $\phi$ degrees, then $\theta \in [-\alpha,\alpha]$ and $\phi \in [-\beta,\beta]$. You can refer to the following picture to help you understand.

Putata's rival, Budada, wants to know the total area that could possibly be attacked by Putata's Zoe. However, Budada is busy with math problems, so he wants you to help him solve this problem.

입력

The first line contains one integer $T$ ($1\leq T \leq 10^5$), the number of test cases.

For each test case, the input is a single line containing four integers $\ell_1$, $\ell_2$, $\alpha$ and $\beta$ ($1\leq \ell_2\leq \ell_1\leq 10^9$, $0\leq \alpha \leq 90$, $0\leq \beta < 180$), indicating the attributes of the ability.

출력

Print one line for each test case, containing one real number indicating the answer.

Your answer will be considered correct if its absolute or relative error does not exceed $10^{-6}$. Formally, let your answer be $a$, and the jury's answer be $b$. Your answer will be considered correct if $\frac{|a-b|}{\max(1,|b|)}\leq 10^{-6}$.

예제 입력 1

5
2 1 20 20
3 3 0 0
20 20 90 120
20 10 50 170
100 10 1 93

예제 출력 1

3.490658503988659
0.000000000000000
3367.157611906510738
1098.863278984081717
373.960489570087645