#include #include using namespace std; using namespace atcoder; #define ll long long #define rep(i,n) for (int i = 0; i < (n); i++) #define coutf(f) cout << fixed << setprecision(f) #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbegin(), (v).rend() int main() { ll x, y, a, b; cin >> x >> a >> y >> b; map mp, mq; for (ll i = 2; i * i <= x; i++) { while (x % i == 0) { x /= i; mp[i]++; } } if (x != 1) mp[x]++; for (ll i = 2; i * i <= y; i++) { while (y % i == 0) { y /= i; mq[i]++; } } if (y != 1) mq[y]++; for (auto p : mp) { if (p.second * a < mq[p.first] * b) { cout << "No" << endl; return 0; } } for (auto q : mq) { if (mp[q.first] == 0) { cout << "No" << endl; return 0; } } cout << "Yes" << endl; return 0; }