import java.util.*; public class Main { static int[] xArr; static int[] yArr; static int[] cArr; static int[][][] dp; static int fee; public static void main (String[] args) { Scanner sc = new Scanner(System.in); if (check(sc.nextLong(), sc.nextLong())) { System.out.println("Yes"); } else { System.out.println("No"); } } static boolean check(long a, long b) { if (a == 0 && b == 0) { return true; } if (a < 0 || b < 0) { return false; } if (a <= Integer.MAX_VALUE && b <= Integer.MAX_VALUE) { return check((int)a, (int)b); } if (a % 2 == 0) { if (b % 2 == 0) { if (check(a / 2, b - 1)) { return true; } else { return check(a - 1, b / 2); } } else { return check(a / 2, b - 1); } } else { if (b % 2 == 0) { return check(a - 1, b / 2); } else { return false; } } } static boolean check(int a, int b) { if (a == 0 && b == 0) { return true; } if (a < 0 || b < 0) { return false; } if (a % 2 == 0) { if (b % 2 == 0) { if (check(a / 2, b - 1)) { return true; } else { return check(a - 1, b / 2); } } else { return check(a / 2, b - 1); } } else { if (b % 2 == 0) { return check(a - 1, b / 2); } else { return false; } } } }