#include "bits/stdc++.h" using namespace std; int main(){ int a,b; cin >> a >> b; bool f = false; for(int i = 1; i <= a; i++){ if(a % i == 0 && i % b == 0) f = true; } cout << (f ? "YES" : "NO") << endl; }