#define _GLIBCXX_DEBUG #define ll long long #include using namespace std; using Graph = vector>; int main(){ int A, B; cin >> A >> B; map mp; for(int i = 1; i*i <= A; i++){ if(A%i == 0){ mp[A/i]++; mp[i]++; } } for(auto p: mp){ if(p.first%B == 0){ cout << "YES" << endl; return 0; } } cout << "NO" << endl; }