Divisors number divisibility

All submissions for this problem are available.
For a given positive integer N find the number of all positive integers X such that N divides X and the number of all positive divisors of X (including 1 and X) is equal to N. If there exist infinitely many such numbers print 1.
Input
The first line contains a single positive integer T <= 100, the number of test cases. T test cases follow. The only line of each test case contains a positive integer N , where N <= 10^18.
Output
For each test case, output a single line containing the answer for the corresponding test case.
Example
Input: 3 6 113 144 Output: 2 1 1
Explanation
In the first test case only numbers 12 and 18 have 6 divisors and are divisible by 6.
In the second test case the only number is 113^112.
In the third test case there are infinitely many of them.
Author:  anton_lunyov 
Tester:  friggstad 
Editorial  http://discuss.codechef.com/problems/DIVNODIV 
Tags  anton_lunyov, cook06, hard 
Date Added:  13012011 
Time Limit:  0.361299 sec 
Source Limit:  50000 Bytes 
Languages:  C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, PYP3, CLOJ, FS 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions
HELP
If you are still having problems, see a sample solution here. 