Skip to main content

~/algor $ cat contests/round-7/V

V. Connecting resistors

Problem V ICPC rules 1000 ms 64 MB

There are two resistors with resistances and (ohms). Connected in series, their total resistance is ; connected in parallel, it is . Find both:

Top: two resistors in series (total resistance Rk); bottom: in parallel (total resistance Rp)

Input

One line with two positive integers: and .

Output

One line with two numbers: — an integer, — with exactly 2 digits after the decimal point (for example, 1.20).

Note

Examples

Input #1
2 3
Output #1
5 1.20
Input #2
10 10
Output #2
20 5.00

Sign in to submit a solution

Signing up is free and takes a minute.