import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* Created by hardCode on 4/8/2017.
*/
class MonkAndAtm {
static final int MAX=10000001;
static int smallestFacctor[]=new int[MAX];
//BufferedReader br=new BufferedReader(new FileReader("input.txt"));
int t,n;
initFactors();
StringBuilder sbr=new StringBuilder();
while (t-- > 0) {
//System.out.println("stuck at "+n);
sbr.append(solve(n) + "\n");
//System.out.println(solve(n));
}
System.
out.
print(sbr.
toString());
}
private static int solve(int n) {
int sqrt
= (int) Math.
sqrt(n
);
for (int m =1; m<=sqrt ; m++) {
if (n%m==0)
{
int x=n/m;
//System.out.println(smallestFacctor[x]);
int temp=countFactors(x);
if (isPowerOf2(temp))
temp=countFactors(m);
if (isPowerOf2(temp))
}
}
return ans;
}
public static int countFactors(int n) {
int m=n,count=0,ans=1;
while (n>1){
count=0;
int x= smallestFacctor[n];
//System.out.println(n+" "+x+" "+(n%x==0));
//System.out.println("s factor "+n+" "+x);
while (n%x==0){
count++;
n/=x;
}
ans*=(count+1);
}
return ans;
}
public static boolean isPowerOf2(int n) {
if (n==1)
return true;
if ((n&1)==1 || n==0)
return false;
return isPowerOf2(n >> 1);
}
private static void initFactors() {
for (int i = 2; i < MAX; i+=2) {
smallestFacctor[i]=2;
}
smallestFacctor[0]=1;
smallestFacctor[1]=1;
int sqrt
= (int) Math.
sqrt(MAX
);
for (int i = 3; i <MAX; i+=2) {
if (smallestFacctor[i]==0){
smallestFacctor[i]=i;
if ((long)i*i<MAX)
for (int j =i*i; j <MAX ; j+=2*i) {
if (smallestFacctor[j]==0)
smallestFacctor[j]=i;
}
}
}
}
}