Alex has started hacking websites, and also started learning encryption and decryption of messages. Once he faced an interesting issue, where he needs to decrypt the message in a different way.
Initially, he will be given an array A of N integers, and has to decrypt Q messages. In each message he will get an integer X, and if X can be converted into product of two different or same prime numbers, then the real message is "YES"
(without quotes), otherwise the message is "NO"
(without quotes).
To convert X, he can choose one element from array say Y (X should be divisible Y), and can divide X by Y any number of times (till X is divisible by Y). Help Alex in decrypting the messages.
Input Format:
First line will contain an integer N and Q,, denoting the number of elements in the array and number of encrypted messages respectively.
Next line will contain N space-separated integers representing the elements of the array.
In next Q lines, each line will contain an integer X , representing an encrypted message.
Output Format:
For each encrypted message, output the decrypted message in new line.
Constraints:
For ,
We can choose 2 from the given array and divide X by 2 , two times, which will result in 4.
As, . So answer is YES
.
For , we can't choose any number from the array by using which we can convert X in product of two primes. So answer is NO
.
For ,
We can choose 2 from the given array and divide X by 2 only one time, which will result in .
As, . So answer is YES
.