Pin was assembling his new, highly important invention. However, at some point, he noticed an error in one of the formulas, which might have caused him to assemble one of the components incorrectly.
After carefully examining the component and correcting the formula, Pin discovered that it contained two gears with and teeth, respectively. For the component to function correctly, the gears should have sizes a + x and b + x, where is a non-negative integer that satisfies the following conditions:
a + x is divisible by ;
b + x is divisible by .
Pin is very tired and asks for help in finding the smallest suitable value of . Since he does not like overly large gears, the smallest possible should be chosen among all valid options.
One line contains two integers and b~(1 \le a, b \le 10^9) — the sizes of the gears in the component.
Print one non-negative integer — the minimum number of teeth needed for the gears to function correctly.
Example 2
Example 3
Example 4