A positive numbers consider as \"Prime Relative\" if that number only remains 0
ID: 3627929 • Letter: A
Question
A positive numbers consider as "Prime Relative" if that number only remains 0 if: divided by 1, divided by itself; and divided by at most two other positive numbers.
Mr. D give you T(1<=T<=8)of number, of integer N (1<=N<=1000000000). Please consider that N is " Prime Relative" or not.
Input format:
First line contanied an integer of T. The next T line contained each integer of N.
Output format:
T of line, each contained "YES" if n is "Prime Relative", or "NOT" if not.
input example:
3
17
51
52
output example:
YES
YES
NOT
Note:
the factor of 51 are 1,3,17,and 51
factor of 52 are 1,2,4,13,26,52,
then 51 is "prime relative"
and 52 is not.
as that kind of definition set, the prime number is also "Prime Relative"
(in Pascal Programming language)