Problem:
Score : 100 points

Problem Statement

In an electric circuit, when two resistors R_1 and R_2 are connected in parallel, the equivalent resistance R_3 can be derived from the following formula:

\frac{1}{R_1} + \frac{1}{R_2} = \frac{1}{R_3}

Given R_1 and R_2, find R_3.

Constraints

1 \leq R_1, R_2 \leq 100

R_1 and R_2 are integers.

Input

The input is given from Standard Input in the following format:

R_1 R_2

Output

Print the value of R_3.

The output is considered correct if the absolute or relative error is at most 10^{-6}.

Sample Input 1

2 3

Sample Output 1

1.2000000000

Sample Input 2

100 99

Sample Output 2

49.7487437186

Solution in Java8 (OpenJDK 1.8.0) (judge verdict: Runtime Error)

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int B = in.nextInt();
        int C = in.nextInt();
        int D = in.nextInt();
        int high = Math.abs(A - C);
        int width = Math.abs(B - D);
        if ((high % 2 == 0) && (width % 2 == 0)) {
            System.out.println(Math.max(high, width));
        } else if (high == width) {
            System.out.println(Math.max(high, width));
        } else if (Math.max(high, width) % Math.max(high, width) == 0) {
            System.out.println(Math.max(high, width));
        } else {
            System.out.println(high + width - 1);
        }
    }
}