#include using namespace std; using ll = long long; using ul = unsigned long; using ull = unsigned long long; vector > primeFactorize(ll n) { vector > res; for (ll a = 2; a * a <= n; ++a) { if (n % a != 0) continue; ll ex = 0; while (n % a == 0) { ++ex; n /= a; } res.push_back({ a, ex }); } if (n != 1) res.push_back({ n, 1 }); return res; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll a, b; cin >> a >> b; vector > v = primeFactorize(b); for (const auto& it : v) { if (it.first !=2 && it.first != 5 && (a % b)) { cout << "Yes\n"; return 0; } } cout << "No\n"; return 0; }