|Time limit : 1 s||Memory limit : 1 mb|
|Submitted : 5370||Accepted : 950|
Nearly prime number is an integer positive number for which it is possible to find such primes P1 and P2 that given number is equal to P1*P2. There is given a sequence on N integer positive numbers, you are to write a program that prints Yes if given number is nearly prime and No otherwise.
Input consists of N+1 numbers. First is positive integer N (1<=N<=50000). Next N numbers followed by N. Each number is not greater than 109. All numbers separated by whitespace(s).
Write a line in output for each number of given sequence. Write Yes if given number is nearly prime and No in other case.