import java.util.*; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); long a = in.nextLong(); long b = in.nextLong(); boolean ans = rec(a, b); if(ans) System.out.println("Yes"); else System.out.println("No"); } private static boolean rec(long i, long j) { if(i == 0 || j == 0) return true; if(i % 2 == 0 && j % 2 == 0) return rec(i / 2, j - 1) | rec(i - 1, j / 2); if(i % 2 == 1 && j % 2 == 1) return false; if(i % 2 == 1) return rec(i - 1, j / 2); if(j % 2 == 1) return rec(i / 2, j - 1); return false; } }