Divisor Increase#11487

Divisor Increase

1 second
128 megabytes
Medium

There is an integer . You are allowed to add to any of its divisors not equal to and . The same operation can be applied to the resulting number and so on. Notice that starting from the number , we can reach any composite number by applying several such operations. For example, the number can be reached starting from using operations: 4 \rightarrow 6 \rightarrow 8 \rightarrow 12 \rightarrow 18 \rightarrow 24.

Find the minimal number of operations necessary to transform into .

Input

Each line contains two integers and m\:(4 \le n \le m \le 10^5).

Output

For each test case, print in a separate line the minimal number of operations to transform into . Print if can't be obtained from .

Examples

Example 1

Loading
Loading