#include using namespace std; using ll = long long; #define FOR(i, m, n) for (int i = (m); i < (n); i++) #define REP(i, n) FOR(i, 0, n) #define REP1(i, n) FOR(i, 1, (n) + 1) #define ALL(c) (c).begin(), (c).end() template inline bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;} template inline bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;} const int MOD = 1000000007; const int INF = 1000000001; vector divisors(ll n) { vector v; for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { v.push_back(i); if (i * i != n) { v.push_back(n / i); } } } return v; } int main() { int a, b; cin >> a >> b; vector d = divisors(a); sort(ALL(d)); int c = b; while (c <= a) { for (auto x : d) { if (c == x) { cout << "YES" << endl; return 0; } } c += b; } cout << "NO" << endl; }