import java.io.*; import java.util.*; public class Main_yukicoder683 { private static Scanner sc; private static Printer pr; private static void solve() { long a = sc.nextLong(); long b = sc.nextLong(); Deque sta = new ArrayDeque<>(); Deque stb = new ArrayDeque<>(); sta.push(a); stb.push(b); while (!sta.isEmpty()) { long ea = sta.pop(); long eb = stb.pop(); if (ea == 0 && eb == 0) { pr.println("Yes"); return; } if (ea > 0 && eb % 2 == 0) { ea--; eb /= 2; sta.push(ea); stb.push(eb); } if (eb > 0 && ea % 2 == 0) { eb--; ea /= 2; sta.push(ea); stb.push(eb); } } pr.println("No"); } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes())); pr = new Printer(System.out); solve(); // pr.close(); pr.flush(); // sc.close(); } static String INPUT = null; private static class Printer extends PrintWriter { Printer(OutputStream out) { super(out); } } }