#C13787. T-prime Checker

    ID: 43363 Type: Default 1000ms 256MiB

T-prime Checker

T-prime Checker

You are given an integer T representing the number of test cases. Each test case contains a single positive integer. Your task is to determine whether the given number is a T-prime or not.

A number is called a T-prime if it can be expressed as the square of a prime number. In other words, a number n is T-prime if there exists a prime number p such that

\( n = p^2 \)

For example, 4 is a T-prime because 4 = 22 and 2 is a prime, while 10 is not a T-prime.

Read the input from standard input (stdin) and write the result to standard output (stdout).

inputFormat

The input starts with an integer T (1 ≤ T ≤ 105), the number of test cases. Each of the next T lines contains a single integer n (1 ≤ n ≤ 1012).

Input is provided via standard input (stdin).

outputFormat

For each test case, output a single line containing "YES" if the number is a T-prime; otherwise output "NO".

Output must be written to standard output (stdout).

## sample
1
4
YES