#K69247. Expressible as Product of Two Distinct Primes

    ID: 33044 Type: Default 1000ms 256MiB

Expressible as Product of Two Distinct Primes

Expressible as Product of Two Distinct Primes

You are given a sequence of positive integers. For each integer, your task is to determine whether it can be expressed as the product of two distinct prime numbers.

A number n is said to be expressible as the product of two distinct primes if there exist two different prime numbers p and q such that:

[ p \times q = n, ]

where \(p \neq q\). If such a pair exists, output "YES" for that number; otherwise, output "NO".

Please note: the problem requires that the answer for each input number is printed on a new line.

inputFormat

The first line of input contains a single integer N representing the number of test integers. The second line contains N space-separated integers.

Example:

5
6 15 5 10 14

outputFormat

For each test case, output "YES" if the given number can be expressed as the product of two distinct prime numbers, otherwise output "NO". Each result should be printed on its own line.

Example:

YES
YES
NO
YES
YES
## sample
5
6 15 5 10 14
YES

YES NO YES YES

</p>