#C1629. Perfect Square Matrix

    ID: 44855 Type: Default 1000ms 256MiB

Perfect Square Matrix

Perfect Square Matrix

In this problem, you are given a number of test cases. For each test case, you are provided an integer n. Your task is to determine if n is a perfect square, meaning that n can be arranged into a square matrix with an equal number of rows and columns. In mathematical terms, you need to check whether there exists an integer k such that (k^2 = n). For example, 4 is a perfect square since (2^2 = 4) while 2 is not. The output should be 'YES' if n is a perfect square and 'NO' otherwise.

inputFormat

The first line contains a single integer (t) representing the number of test cases. Each of the following (t) lines contains one integer (n).

outputFormat

For each test case, output a single line containing 'YES' if (n) is a perfect square, or 'NO' otherwise.## sample

4
1
2
4
17
YES

NO YES NO

</p>