#W0001. 切割喵

切割喵

Problem Statement

Given a positive integer nn, determine whether a square can be divided into nn smaller squares (not necessarily of equal size). Output "Yes" or "No" to indicate whether such a division is possible. Multiple test cases are provided.

A division is defined as making a single cut, but the cut must be a straight line whose endpoints lie either on the boundary of the square or on previously made cuts.

Input Format

The first line contains a positive integer TT, the number of test cases.

Each of the next TT lines contains a positive integer nn.

Constraints: 1T1051 \leq T \leq 10^5, 1n1091 \leq n \leq 10^9.

Output Format

For each test case, output a single line with "Yes" or "No" indicating whether such a division is possible.

The output can be in any case-insensitive form (e.g., "yEs", "yes", "Yes", and "YES" are all acceptable).

Sample #1

Sample Input #1

3
4
3
256

Sample Output #1

Yes
No
Yes

Hint

Explanation for Sample #1

  • A square cannot be divided into exactly 33 smaller squares.
  • Since 4=224 = 2^2 and 256=162256 = 16^2, both can be divided into several congruent smaller squares.