#include using namespace std; using ll = long long; vector divisor(ll n){ std::vector res; for(ll i = 1LL; i * i <= n; i++){ if(n % i == 0){ res.push_back(i); ll j = n / i; if(i != j)res.push_back(j); } } std::sort(res.begin(),res.end()); return res; } int main() { int a, b; cin >> a >> b; vector c = divisor(a); cout << (binary_search(c.begin(), c.end(), b) ? "YES" : "NO") << endl; }