#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } int main() { fast_io(); long long x, a, y, b; cin >> x >> a >> y >> b; map pf_x, pf_y; for (long long i = 2; i * i <= x; i++) { while (x % i == 0) { pf_x[i]++; x /= i; } } if (x > 1) { pf_x[x]++; } for (long long i = 2; i * i <= y; i++) { while (y % i == 0) { pf_y[i]++; y /= i; } } if (y > 1) { pf_y[y]++; } for (auto [k, v] : pf_y) { if (pf_x[k] * a < v * b) { cout << "No\n"; return 0; } } cout << "Yes\n"; }