Minimizing the LCM

Find the smallest N of at least 1 that minimizes the least common multiple of A+N and B+N.

Medium6Number theoryMathNo attempts yetTime limit1sMemory limit256 MB

Problem

You are given two natural numbers AA and BB. Find the natural number NN that makes the least common multiple of A+NA + N and B+NB + N as small as possible.

Input

The first line contains two natural numbers AA and BB, separated by a space. 1A,B1091 \le A, B \le 10^9.

Output

Print NN on the first line. If several values of NN make the least common multiple minimal, print the smallest one.

Note

A natural number is an integer of at least 1, so N1N \ge 1.