#K72947. Product of Two Distinct Primes

    ID: 33866 Type: Default 1000ms 256MiB

Product of Two Distinct Primes

Product of Two Distinct Primes

Given an integer n, determine whether it can be expressed as a product of two distinct prime numbers. In other words, check if there exist two primes \(p\) and \(q\) with \(p \neq q\) such that:

[ n = p \times q ]

If such a pair exists, print YES; otherwise, print NO for that test case.

Note: The smallest product of two distinct primes is \(2 \times 3 = 6\). For numbers less than this, the answer will be NO.

inputFormat

The first line of the input contains an integer T denoting the number of test cases.

Each of the next T lines contains a single integer n which needs to be checked.

outputFormat

For each test case, output a single line containing YES if n can be expressed as the product of two distinct prime numbers. Otherwise, output NO.

## sample
4
10
15
21
49
YES

YES YES NO

</p>