#include using namespace std; using ll=long long; #include using namespace atcoder; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); ll N,Q; cin>>N>>Q; string S=to_string(N); for(int q=0;q>X; string SX=to_string(X); if(X%N==0){ cout<<"Yes\n"; continue; } bool OK=0; for(int i=0;i