#K80257. Prime Number Checker

    ID: 35490 Type: Default 1000ms 256MiB

Prime Number Checker

Prime Number Checker

You are given a list of integers. For each integer \(n\), determine whether it is a prime number or not. A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. In other words, a number \(n\) is prime if and only if it is not divisible by any integer \(a\) such that \(2 \leq a \leq \sqrt{n}\).

Your task is to read a sequence of integers from the standard input, check each for primality, and output "Yes" if the number is prime and "No" otherwise.

Input format: The first line contains an integer \(T\), the number of test cases. Each of the following \(T\) lines contains one integer \(n\).

Output format: For each test case, output a single line containing "Yes" if \(n\) is prime, otherwise output "No".

inputFormat

The input consists of multiple lines. The first line has an integer \(T\) indicating the number of test cases. This is followed by \(T\) lines, each containing a single integer \(n\).

outputFormat

For each test case, output a single line with "Yes" if the input integer \(n\) is a prime number, or "No" if it is not.

## sample
4
2
4
5
10
Yes

No Yes No

</p>