import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); long a = sc.nextLong(); long b = sc.nextLong(); long bigger = Math.max(a,b); long smaller = Math.min(a,b); while(bigger > 0){ bigger = bigger / 2; smaller = smaller / 2; if(bigger % 2 != smaller % 2){ System.out.println("No"); return; } } System.out.println("Yes"); } }