Todoroki loves maths. He loves math so much that he has asked the maths teacher to give extra homework to him. After starting to solve the problems, he has realized that it'll take him too much time to solve all problems. So, he has asked you to help him get his homework done in time.
There are a total of T problems. Each one states that given 2 positive integers A and B, find the maximum times it'll take to make B lesser than A. In other words, find max possible no. of operations to make B less than A where each operation is division of B with K where K is a positive integer greater than 1 and K divides B.
Note: K value for each operation could be different.
Input Format:
First line contains T, number of problems.
Each of the next T lines contains A and B.
Output Format:
Print the required answer for each problem in separate lines.
Constraints:
1≤T≤105
2≤A≤B≤106
In first problem, only one division operation could be performed with K = 7.
In second problem, operations are 12/2 = 6, 6/2 = 3 and 3/3 = 1. We cannot make operations more than 3.
In third problem, operations could be 100/5 = 20, 20/2 = 10, 10/5 = 2. Other possiblity could be 100/2 = 50, 50/2 = 25, 25/25 = 1. We can see that it's not possible to make it greater than 3.
In fourth problem, one possiblity is 16/2 = 8, 8/2 = 4. Other could be 16/2 = 8, 8/4 = 2.