#include namespace { #include using namespace std; using namespace atcoder; #define rep(i,n)for (int i = 0; i < int(n); ++i) #define rrep(i,n)for (int i = int(n)-1; i >= 0; --i) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() template void chmax(T& a, const T& b) { a = max(a, b); } template void chmin(T& a, const T& b) { a = min(a, b); } using ll = long long; using P = pair; using VI = vector; using VVI = vector; using VL = vector; using VVL = vector; std::vector> factorize(long long x) { std::vector> ret; for(long long p = 2; p * p <= x; p++) { int cnt = 0; while(x % p == 0) x /= p, cnt++; if (cnt) ret.emplace_back(p, cnt); } if (x > 1) ret.emplace_back(x, 1); return ret; } } int main() { ios::sync_with_stdio(false); cin.tie(0); ll x, a, y, b; cin >> x >> a >> y >> b; auto fx = factorize(x); auto fy = factorize(y); bool ok = true; for(auto [p, c]: fy) { auto it = lower_bound(all(fx), pair{p, -1}); if (it == fx.end() || it->first != p) { ok = false; break; } if (it->second * a < c * b) { ok = false; break; } } cout << (ok ? "Yes\n" : "No\n"); }