Etibar loves number theory very much. Now it is time to solve a new kind of problem.
There is given a natural number . He has to answer queries of the form . Here is the type of query and is the natural number.
If T = 1, He must find the number of natural numbers which are divisors of both and .
If T = 2, He must find the number of natural numbers which are divisors of and are divisible by .
If T = 3, He must find the number of natural numbers which are divisors of and are not divisible by .
Etibar can solve all these queries, but you will be hungry at night if this happens, because He will not have free time to do it. Therefore you compromise with him and decided that everyone must do his own job. You must program and our hero must do his own works.
There will be two numbers in the first line: and (1 \le N \le 10^{12}, 1 \le Q \le 5 \cdot 10^5). lines follow with two numbers each: and (1 \le T \le 3, 1 \le K \le 10^{12}).
For each of the lines you must output the result for corresponding query in separate line.
Example 1