Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/begin-avtomobillar-uchrashuvi

Two cars meet

Easy 1000 ms 64 MB 12%
Share

The distance between cities $A$ and $B$ is $S$ km. At the same moment, the first car leaves $A$ for $B$ at $v_{1}$ km/h, and the second car leaves $B$ for $A$ at $v_{2}$ km/h. After how many hours ($t$) do they meet, and how far from city $A$ ($d$, km) is the meeting point?

$$t = \frac{S}{v_{1} + v_{2}}, \qquad d = v_{1} * t$$

The road between cities A and B (length S): a car at speed v1 leaves A and a car at speed v2 leaves B, driving towards each other; the meeting point is d away from A

Input

One line with three positive integers: $S$, $v_{1}$ and $v_{2}$.

Output

One line with two numbers: $t$ and $d$, each with exactly 2 digits after the decimal point (for example, 3.00).

Note

$1 \le S \le 10^{4}$
$1 \le v_{1}, v_{2} \le 300$

Examples

Input #1
300 60 40
Output #1
3.00 180.00
Input #2
10 1 2
Output #2
3.33 3.33

Sign in to submit a solution

Signing up is free and takes a minute.