There is an integer k. You are allowed to add to k any of its divisors not equal to 1 and k. The same operation can be applied to the resulting number and so on. Notice that starting from the number 4, we can reach any composite number by applying several such operations. For example, the number 24 can be reached starting from 4 using 5 operations: 4→6→8→12→18→24.
You have to solve a more general problem. Find the minimal number of the described operations necessary to transform n into m.
Each line contains two integers n and m(4≤n≤m≤105).
For each test case, print in a separate line the minimal number of operations to transform n into m. Print −1 if m can't be obtained from n.