#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; ll MOD = 1000000007; typedef pair P; int main() { ios::sync_with_stdio(false); cin.tie(0); int a, b; cin >> a >> b; vector v; for (int i = 1; i < a + 1; i++) { if (a % i == 0) v.push_back(i); } for (int i = 0; i < v.size(); i++) { if (v[i] % b == 0) { cout << "YES" << endl; return 0; } } cout << "NO" << endl; }