#include #include using namespace std; int main() { long long x, y, a, b; cin >> x >> a >> y >> b; map mpa; map mpb; for (int i = 2; i < 1000000; i++) { while(x % i == 0) { x /= i; mpa[i]++; } if (x == 1) break; if (i == 999999) mpa[x]++; } for (int i = 2; i < 1000000; i++) { while(y % i == 0) { y /= i; mpb[i]++; } if (y == 1) break; if (i == 999999) mpb[y]++; } bool res = true; for (auto p : mpb) { if ((long long)a * mpa[p.first] < (long long)b * p.second) res = false; } if (res) cout << "Yes" << endl; else cout << "No" << endl; return 0; }