import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); long a = sc.nextLong(); long b = sc.nextLong(); b /= getGCD(a, b); while (b % 2 == 0) { b /= 2; } while (b % 5 == 0) { b /= 5; } if (b > 1) { System.out.println("Yes"); } else { System.out.println("No"); } } static long getGCD(long a, long b) { if (a % b == 0) { return b; } else { return getGCD(b, a % b); } } }