#include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; map prime_factor(ll n){ ll m = n; map prime; if (n % 2 == 0){ while(n % 2 == 0){ prime[2]++; n /= 2; } } for (ll i = 3; i*i <= m; i+=2){ if (n % i == 0){ while(n % i == 0){ prime[i]++; n /= i; } } } if (n != 1){ prime[n]++; } return prime; } int main(){ ll X, A, Y, B; cin >> X >> A >> Y >> B; map xp, yp; xp = prime_factor(X); yp = prime_factor(Y); for (auto [p, e] : yp){ if (xp[p] * A < e * B){ cout << "No" << endl; return 0; } } cout << "Yes" << endl; return 0; }