#include using namespace std; using Int = long long; constexpr static int mod = 1e9 + 7; constexpr static int inf = (1 << 30) - 1; constexpr static Int infll = (1LL << 61) - 1; int Competitive_Programming = (ios_base::sync_with_stdio(false), cin.tie(nullptr), cout << fixed << setprecision(15), 0); #pragma GCC optimize("Ofast", "unroll-loops", "omit-frame-pointer", "inline") #pragma GCC option("arch=native", "tune=native", "no-zero-upper") #pragma GCC target("avx2") map primes(Int n) { map mp; for (Int i = 2; i * i <= n; i++) { while (n % i == 0) n /= i, mp[i]++; } if (n > 1) mp[n]++; return mp; } int main() { Int x, a, y, b; cin >> x >> a >> y >> b; auto px = primes(x), py = primes(y); for (auto &&[k, v] : py) { if (px[k] * a < v * b) { cout << "No\n"; return 0; } } cout << "Yes\n"; }