On the same rail there are two trains approaching each other.
The train at the left goes to the right at constant speed t_{1}.
The train at the right goes to the left at constant speed t_{2}.
Initially, the noses of the trains are d distance units apart.
There is a fly at the nose of the left train
that starts flying to the right at constant speed f_{1},
where f_{1} > t_{1}.
Similarly, there is a fly at the nose of the right train
that starts flying to the left at constant speed f_{2},
where f_{2} > t_{2}.
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

Input consists of several cases,
each one with d, t_{1}, t_{2}, f_{1} and f_{2}.
All given numbers are strictly positive integers,
and no larger than 10^{6}.
Assume f_{1} > t_{1} and f_{2} > t_{2}.

Output

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.

Public test cases

**Input**

1 1 1 2 2 1234 12 23 42 100

**Output**

1.0000 1.0000 1480.8000 3525.7143

Information

- Author
- Salvador Roura
- Language
- English
- Other languages
- Catalan
- Official solutions
- C++
- User solutions
- C++