import java.io.*; import java.util.*; import java.util.function.*; import java.util.stream.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); System.out.println(dfw(sc.nextLong(), sc.nextLong()) ? "Yes" : "No"); } static boolean dfw(long a, long b) { if (a == 0 || b == 0) { return true; } if (a % 2 == 0) { if (b % 2 == 0) { return dfw(a / 2, b - 1) || dfw(a - 1, b % 2); } else { return dfw(a / 2, b - 1); } } else { if (b % 2 == 0) { return dfw(a - 1, b / 2); } else { return false; } } } } class Scanner { BufferedReader br; StringTokenizer st = new StringTokenizer(""); StringBuilder sb = new StringBuilder(); public Scanner() { try { br = new BufferedReader(new InputStreamReader(System.in)); } catch (Exception e) { } } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } public String next() { try { while (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } } catch (Exception e) { e.printStackTrace(); } finally { return st.nextToken(); } } }