#include "bits/stdc++.h" #define int long long using namespace std; using ll = long long; using P = pair; const ll INF = (1LL << 61); ll mod = 1000000007; map prime_factor(ll n) { map ret; for (ll i = 2; i * i <= n; i++) { while (n % i == 0) { ret[i]++; n /= i; } } if (n != 1) ret[n] = 1; return ret; } signed main() { ios::sync_with_stdio(false); cin.tie(0); int X, A, Y, B; cin >> X >> A >> Y >> B; mapmp, mp2; mp = prime_factor(X); mp2 = prime_factor(Y); for (auto x : mp) { int now = x.second; now *= A; int now2 = mp2[x.first]; now2 *= B; if (now < now2) { cout << "No" << endl; return 0; } } for (auto x : mp2) { int now = x.second; now *= B; int now2 = mp[x.first]; now2 *= A; if (now > now2) { cout << "No" << endl; return 0; } } cout << "Yes" << endl; return 0; }