Determine for each number whether it is a square of a prime number.
You are given several integers. For each integer , decide whether it is a T-prime.
A number is called T-prime if it has exactly three positive divisors. A useful fact is that a number is T-prime if and only if it is the square of a prime number.
For every query, output YES if the number is T-prime, otherwise output NO.
YES if it is a T-prime, otherwise print NO.Example 1
Input
3 4 5 9
Output
YES NO YES
Explanation
and $2 is prime, so it is T-prime. \59 = 3^2 and \3$ is prime, so it is T-prime.
Premium problem context
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.