#K83927. Comparing Numbers in Scientific Notation

    ID: 36306 Type: Default 1000ms 256MiB

Comparing Numbers in Scientific Notation

Comparing Numbers in Scientific Notation

You are given two numbers in scientific notation. The first number is represented as \(X_1 \times 10^{Y_1}\) and the second number as \(X_2 \times 10^{Y_2}\). Your task is to compare these two numbers.

Output 1 if the first number is greater than the second, -1 if it is smaller, and 0 if they are equal.

Note that the numbers may have large or negative exponents. Ensure that your solution handles these cases correctly.

inputFormat

The input is given via standard input and consists of four values: X1 (a float), Y1 (an integer), X2 (a float) and Y2 (an integer), separated by whitespace.

These represent two numbers in scientific notation as \(X_1 \times 10^{Y_1}\) and \(X_2 \times 10^{Y_2}\) respectively.

outputFormat

Output a single integer to standard output: 1 if the first number is larger, -1 if the first number is smaller, or 0 if the numbers are equal.

## sample
1.23 4 5.67 2
1