#C11953. Perfect Square Checker

    ID: 41326 Type: Default 1000ms 256MiB

Perfect Square Checker

Perfect Square Checker

This problem requires you to determine whether each number in a given list is a perfect square. A perfect square is an integer that is the square of an integer. For example, 1, 4, 9, 16 are perfect squares because they are 1², 2², 3², and 4² respectively.

Problem Statement: Given an integer n and a sequence of n integers, check for each integer whether it is a perfect square. If it is, print YES; otherwise, print NO.

Note: The solution must read from standard input and write to standard output.

inputFormat

The input is given in two lines. The first line contains a single integer n representing the number of integers. The second line contains n space-separated integers.

outputFormat

For each integer in the input, output a line containing either YES if the integer is a perfect square or NO if it is not.## sample

4
1 2 4 7
YES

NO YES NO

</p>