#include #define fi first #define se second using std::cin; using std::cout; using std::map; using std::pair; using ll = long long; map factorize(ll n) { map mp; for (ll i = 2; i * i <= n; ++i) { if (n % i) continue; while (n % i == 0) { n /= i; mp[i]++; } } if (n != 1) mp[n] = 1; return mp; } int main() { ll x, a, y, b; cin >> x >> a >> y >> b; auto f = factorize(x); auto g = factorize(y); bool ok = all_of(g.begin(), g.end(), [&](pair p) { return f[p.fi] * a >= p.se * b; }); puts(ok ? "Yes" : "No"); return 0; }