import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); long x = sc.nextLong(); long a = sc.nextLong(); long y = sc.nextLong(); long b = sc.nextLong(); sc.close(); Map mx = bunkai(x); Map my = bunkai(y); for (long k : my.keySet()) { if (!mx.containsKey(k)) { System.out.println("No"); return; } long vx = mx.get(k) * a; long vy = my.get(k) * b; if (vx < vy) { System.out.println("No"); return; } } System.out.println("Yes"); } static Map bunkai(long n) { Map soinsu = new HashMap<>(); int end = (int) Math.sqrt(n); long d = 2; while (n > 1) { if (n % d == 0) { n /= d; soinsu.put(d, soinsu.getOrDefault(d, 0) + 1); end = (int) Math.sqrt(n); } else { if (d > end) { d = n - 1; } d++; } } return soinsu; } }