Time Limit: 2 Seconds
Memory Limit: 65536 KB
Fujiwara no Mokou was formerly an ordinary human, but she became an immortal being after drinking the Hourai Elixir about 1300 years ago. She has some sort of control over fire.
One day, Mokou was on the way home after cutting bamboo. Suddenly it began to rain. As a manipulator of fire, Mokou dislikes rains. So she ran to her home as quickly as possible.
We can regard Mokou as a cylinder. The path can be simplified as a line. Mokou started from (0, 0, 0) and her home is at (x0, 0, 0). It is supposed that the rain is continuous and its density is 1. The rain will be absorbed immediately when it touches the surface of the cylinder or the ground. You need to measure how much weight of rain was absorbed by Mokou during her way to home in the rain.
There are multiple cases. The first line of the input contains an integer T (1 ≤ T ≤ 200) which indicates the number of cases. For each test case:
The first line contains four integers R, H, V, x0, the radius, height and speed of the cylinder and the location of Mokou's house.
The second line contains three integers dx, dy and dz, the speed of the rain.
All integers in input are no less than -1000 and no larger than 1000. Test data satisfy that R, H, V, x0 > 0, dz < 0.
For each case, output the total weight of rain which was absorbed by Mokou. Absolute or relative error no more than 1E-6 will be accepted.