def prime_fact(n) ans = Hash.new(0) prime = 2.upto(n).to_a 2.upto(n) {|i| if prime.include?(i) then k = 2 while k * i <= n do prime.delete(k*i) k += 1 end end } if prime.include?(n) ans[n] = 1 else i = 0 while i < prime.length do p = prime[i] if n % p == 0 ans[p] += 1 n /= p else i += 1 end end end ans end X, A, Y, B = gets.split(" ").map{|s| s.to_i} x = prime_fact(X) y = prime_fact(Y) result = true y.each {|k, v| if x[k] * A < y[k] * B then result = false break end } puts result ? "Yes" : "No"