cho.sh
Notes
Loading...

Counting Multiples by Divisor Count

Time limit

1s

Memory limit

512 MB

Problem

You are given a positive integer N. Count how many positive integers X satisfy both conditions below.

  • X is a multiple of N.
  • The number of positive divisors of X is exactly N.

Input

The first line contains the number of test cases T. Each of the next T lines contains one positive integer N.

Output

For each test case, print the number of positive integers X that satisfy the conditions. If infinitely many such integers exist, print -1.

Constraints

  • 1 ≤ T ≤ 100
  • 1 ≤ N ≤ 10^18

Hint

In the first case, 12 and 18 satisfy the conditions. In the second case, 113^112 satisfies the conditions.