Big product
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
The jury decided to give you a difficult task. Given numbers a and b, find the following product of numbers a * (a + 1) * ... * b.
Thinking further that the task would be too boring, instead of the value of the product, the jury decided to ask you for the sign of the product. So, you need to find whether this product is positive, negative or zero.
Input
Two integers a and b (-10^9
≤ a ≤ b ≤ 10^9
).
Output
Print the sign of the product a * (a + 1) * ... * b - one of the next numbers "-1", "0", "1" correspondingly.
Examples
Input #1
Answer #1
Input #2
Answer #2
Input #3
Answer #3
Input #4
Answer #4
Submissions 7K
Acceptance rate 28%