description: You are given two positive integers x and y. You can perform the following operation with x: write it in its binary form without leading zeros, add 0 or 1 to the right of it, reverse the binary form and turn it into a decimal number which is assigned as the new value of x.
  
  For example: 
  
    * 34 can be turned into 81 via one operation: the binary form of 34 is 100010, if you add 1, reverse it and remove leading zeros, you will get 1010001, which is the binary form of 81. 
    * 34 can be turned into 17 via one operation: the binary form of 34 is 100010, if you add 0, reverse it and remove leading zeros, you will get 10001, which is the binary form of 17. 
    * 81 can be turned into 69 via one operation: the binary form of 81 is 1010001, if you add 0, reverse it and remove leading zeros, you will get 1000101, which is the binary form of 69. 
    * 34 can be turned into 69 via two operations: first you turn 34 into 81 and then 81 into 69. 
  
  
  
  Your task is to find out whether x can be turned into y after a certain number of operations (possibly zero).
  
  Input
  
  The only line of the input contains two integers x and y (1 ≤ x, y ≤ 10^{18}).
  
  Output
  
  Print YES if you can make x equal to y and NO if you can't.
  
  Examples
  
  Input
  
  
  3 3
  
  
  Output
  
  
  YES
  
  
  Input
  
  
  7 4
  
  
  Output
  
  
  NO
  
  
  Input
  
  
  2 8
  
  
  Output
  
  
  NO
  
  
  Input
  
  
  34 69
  
  
  Output
  
  
  YES
  
  
  Input
  
  
  8935891487501725 71487131900013807
  
  
  Output
  
  
  YES
  
  Note
  
  In the first example, you don't even need to do anything.
  
  The fourth example is described in the statement.
solution: //package Codeforces.Round760Div3;
  
  import java.io.*;
  import java.util.*;
  
  public class F {
      static Set<Long> set = new HashSet<>();
      static String reverse(String s){
          StringBuilder sb = new StringBuilder();
          for(int i=s.length()-1;i>=0;i--){
              sb.append(s.charAt(i));
          }
  
          return sb.toString();
      }
      static void generate(long x){
          if(set.contains(x))
              return;
  
          set.add(x);
          String bin = Long.toBinaryString(x);
          if(bin.length()==63)
              return;
  
          String bin0 = bin + "0";
          String bin1 = bin + "1";
          bin0 = reverse(bin0);
          bin1 = reverse(bin1);
  
          long y1 = Long.parseLong(bin0, 2);
          long y2 = Long.parseLong(bin1, 2);
  
          generate(y1);
          generate(y2);
      }
  
      public static void main(String[] args) throws IOException {
          Soumit sc = new Soumit();
  
          long x = sc.nextLong();
          long y = sc.nextLong();
  
          generate(x);
  
          if(set.contains(y)){
              System.out.println("YES");
          }
          else System.out.println("NO");
  
          sc.close();
      }
  
      static class Soumit {
          final private int BUFFER_SIZE = 1 << 18;
          final private DataInputStream din;
          final private byte[] buffer;
          private PrintWriter pw;
          private int bufferPointer, bytesRead;
          StringTokenizer st;
  
          public Soumit() {
              din = new DataInputStream(System.in);
              buffer = new byte[BUFFER_SIZE];
              bufferPointer = bytesRead = 0;
          }
  
          public Soumit(String file_name) throws IOException {
              din = new DataInputStream(new FileInputStream(file_name));
              buffer = new byte[BUFFER_SIZE];
              bufferPointer = bytesRead = 0;
          }
  
          public void streamOutput(String file) throws IOException {
              FileWriter fw = new FileWriter(file);
              BufferedWriter bw = new BufferedWriter(fw);
              pw = new PrintWriter(bw);
          }
  
          public void println(String a) {
              pw.println(a);
          }
  
          public void print(String a) {
              pw.print(a);
          }
  
          public String readLine() throws IOException {
              byte[] buf = new byte[3000064]; // line length
              int cnt = 0, c;
              while ((c = read()) != -1) {
                  if (c == '\n')
                      break;
                  buf[cnt++] = (byte) c;
              }
              return new String(buf, 0, cnt);
          }
  
          String next() {
              while (st == null || !st.hasMoreElements()) {
                  try {
                      st = new StringTokenizer(readLine());
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
              }
              return st.nextToken();
          }
  
          public void sort(int[] arr) {
              ArrayList<Integer> arlist = new ArrayList<>();
              for (int i : arr)
                  arlist.add(i);
  
              Collections.sort(arlist);
              for (int i = 0; i < arr.length; i++)
                  arr[i] = arlist.get(i);
          }
  
          public void sort(long[] arr) {
              ArrayList<Long> arlist = new ArrayList<>();
              for (long i : arr)
                  arlist.add(i);
  
              Collections.sort(arlist);
              for (int i = 0; i < arr.length; i++)
                  arr[i] = arlist.get(i);
          }
  
          public int[] nextIntArray(int n) throws IOException {
              int[] arr = new int[n];
              for (int i = 0; i < n; i++) {
                  arr[i] = nextInt();
              }
  
              return arr;
          }
  
          public long[] nextLongArray(int n) throws IOException {
              long[] arr = new long[n];
              for (int i = 0; i < n; i++) {
                  arr[i] = nextLong();
              }
  
              return arr;
          }
  
          public double[] nextDoubleArray(int n) throws IOException {
              double[] arr = new double[n];
              for (int i = 0; i < n; i++) {
                  arr[i] = nextDouble();
              }
  
              return arr;
          }
  
          public int nextInt() throws IOException {
              int ret = 0;
              byte c = read();
              while (c <= ' ')
                  c = read();
              boolean neg = (c == '-');
              if (neg)
                  c = read();
              do {
                  ret = ret * 10 + c - '0';
              } while ((c = read()) >= '0' && c <= '9');
  
              if (neg)
                  return -ret;
              return ret;
          }
  
          public long nextLong() throws IOException {
              long ret = 0;
              byte c = read();
              while (c <= ' ')
                  c = read();
              boolean neg = (c == '-');
              if (neg)
                  c = read();
              do {
                  ret = ret * 10 + c - '0';
              }
              while ((c = read()) >= '0' && c <= '9');
              if (neg)
                  return -ret;
              return ret;
          }
  
          public double nextDouble() throws IOException {
              double ret = 0, div = 1;
              byte c = read();
              while (c <= ' ')
                  c = read();
              boolean neg = (c == '-');
              if (neg)
                  c = read();
  
              do {
                  ret = ret * 10 + c - '0';
              }
              while ((c = read()) >= '0' && c <= '9');
  
              if (c == '.') {
                  while ((c = read()) >= '0' && c <= '9') {
                      ret += (c - '0') / (div *= 10);
                  }
              }
  
              if (neg)
                  return -ret;
              return ret;
          }
  
          private void fillBuffer() throws IOException {
              bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
              if (bytesRead == -1)
                  buffer[0] = -1;
          }
  
          private byte read() throws IOException {
              if (bufferPointer == bytesRead)
                  fillBuffer();
              return buffer[bufferPointer++];
          }
  
          public void close() throws IOException {
              /*if (din == null)
                  return;*/
              if (din != null) din.close();
              if (pw != null) pw.close();
          }
      }
  }
  