Time limit
1s
Memory limit
512 MB
You are given a positive integer N. Count how many positive integers X satisfy both conditions below.
X is a multiple of N.X is exactly N.The first line contains the number of test cases T. Each of the next T lines contains one positive integer N.
For each test case, print the number of positive integers X that satisfy the conditions. If infinitely many such integers exist, print -1.
1 ≤ T ≤ 1001 ≤ N ≤ 10^18In the first case, 12 and 18 satisfy the conditions. In the second case, 113^112 satisfies the conditions.