#include using namespace std; typedef long long ll; typedef string str; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll k, n; cin >> k >> n; for (ll i = 0; i < n; i++) { ll x; cin >> x; str s = to_string(x); size_t p = s.find("10"); if (p != str::npos || x % k == 0) cout << "Yes\n"; else cout << "No\n"; } return 0; }