#K84692. Check Prime Presence in Lists
Check Prime Presence in Lists
Check Prime Presence in Lists
You are given several lists of integers. For each list, determine whether the list contains at least one prime number.
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 \( p \) is prime if \( p > 1 \) and for every integer \( d \) such that \( 2 \le d \le \sqrt{p} \), \( p \) is not divisible by \( d \).
Your task is to read the input from standard input and output the answer to standard output. For each test case, if at least one prime is found in the list, print "YES"; otherwise, print "NO".
inputFormat
The input begins with an integer \( T \) representing the number of test cases. Each test case is described as follows:
- An integer \( N \) representing the number of elements in the list.
- A line containing \( N \) space-separated integers.
Input is read from standard input.
outputFormat
For each test case, output a single line containing "YES" if the list contains at least one prime number, otherwise output "NO". The output is printed to standard output.
## sample4
4
4 6 8 12
3
7 14 21
4
11 15 23 35
3
4 6 8
NO
YES
YES
NO
</p>