#include using namespace std; int main(void){ int n,q; cin>>n>>q; int t=1; while(t<=n)t*=10; while(q--){ int x; cin>>x; if(x%n==0){ cout<<"Yes"<