On the same rail there are two trains approaching each other. The train at the left goes to the right at constant speed . The train at the right goes to the left at constant speed . Initially, the noses of the trains are distance units apart. There is a fly at the nose of the left train that starts flying to the right at constant speed , where . Similarly, there is a fly at the nose of the right train that starts flying to the left at constant speed , where . The flies are so small that we can consider them as points. Any time that a fly reaches another fly, or reaches a train, that fly turns around immediately, never changing the absolute value of its speed. Thus, the movement of each fly is like a zig-zag with an infinite number of rebounds.
Given all the information, can you compute the total distance travelled by each fly until the trains collide? If so, you would prove yourself even better than von Neumann!
Input consists of several cases, each one with , , , and . All given numbers are strictly positive integers, and no larger than . Assume and .
For every case, print with four digits after the decimal point the total distance travelled by the first fly and by the second fly. The given cases have no precision issues.
Input
1 1 1 2 2 1234 12 23 42 100
Output
1.0000 1.0000 1480.8000 3525.7143