Hope you still have not forgotten about pig Benny.
She is asking for help again.
This time you have to answer some queries that Benny will give you.
All actions happen in the Universe where each planet has its own id starting from 0. There are infinite amount of planets.
To travel between different planets there are some special spacecrafts. Each spacecraft is characterized by the number di.
If the id of the planet you are currently staying on is idj and you decided you use spacecraft with di you will go to planet with id equal to idj + di.
Benny's parents live nearby the planet with id equal to 0, so you may assume that there exists some spacecraft for which di is not more than 104.
You have to answer Q queries. Each query consists of one single integer x. You have to answer whether it's possible to go from planet with id equal to 0 to planet with id equal to x.
1 <= N <= 10^3
1 <= Q <= 10^5
1 <= Di <= 10^9
1 <= X <= 10^9
The first line contains two integers denoting N and Q.
The second line contains N integers denoting di for spacecrafts. Numbers might be separated with more than one space and not more than 10.
The following Q lines contain single integer denoting xi.
You can reach 5 and 10 (5 + 5) and can not reach 8.