Transform

One can transform \(x\) into \(x + d\) if \(d\) is divisor of \(x\). Find out the minimum number of steps to transform \(a\) into \(b\).

Input

Two integers \(a\) and \(b\).

(\(1 \leq a, b \leq 10^5\))

Output

The only integer denotes the minimum number of steps. Print \(-1\) if impossible.

Sample input

1 6

Sample output

3

Note

\(1 \to 2 \to 4 \to 6\) or \(1 \to 2 \to 3 \to 6\).

Source

Contest #3 on acdream oj by ftiasch