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; boolean b = false; if(i % 2 == 0) b = rec(i / 2, j - 1); if(j % 2 == 0) b = rec(i - 1, j / 2); return b; } }