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: import sys
  read=sys.stdin.buffer.read;readline=sys.stdin.buffer.readline;input=lambda:sys.stdin.readline().rstrip()
  import bisect,string,math,time,functools,random,fractions
  from bisect import*
  from heapq import heappush,heappop,heapify
  from collections import deque,defaultdict,Counter
  from itertools import permutations,combinations,groupby
  rep=range;R=range
  def I():return int(input())
  def LI():return [int(i) for i in input().split()]
  def SLI():return sorted([int(i) for i in input().split()])
  def LI_():return [int(i)-1 for i in input().split()]
  def S_():return input()
  def IS():return input().split()
  def LS():return [i for i in input().split()]
  def NI(n):return [int(input()) for i in range(n)]
  def NI_(n):return [int(input())-1 for i in range(n)]
  def NLI(n):return [[int(i) for i in input().split()] for i in range(n)]
  def NLI_(n):return [[int(i)-1 for i in input().split()] for i in range(n)]
  def StoLI():return [ord(i)-97 for i in input()]
  def ItoS(n):return chr(n+97)
  def LtoS(ls):return ''.join([chr(i+97) for i in ls])
  def RLI(n=8,a=1,b=10):return [random.randint(a,b)for i in range(n)]
  def RI(a=1,b=10):return random.randint(a,b)
  def INP():
      N=10
      n=random.randint(2,N)
      mn=1
      mx=5
      a=[random.randint(mn,mx) for i in range(n)]
      s=[random.randint(mn,mx) for i in range(n)]
      return (n,a,s)
  def Rtest(T):
      case,err=0,0
      for i in range(T):
          inp=INP()
          a1=naive(*inp)
          a2=solve(*inp)
          if a1!=a2:
              x,y=a1
              z,w=a2
              cm=Comb(max(x,z))
              if cm.comb(x,y)==cm.comb(z,w):
                  case+=1
                  continue
              print(inp)
              print('naive',a1)
              print('solve',a2)
              err+=1
          case+=1
      print('Tested',case,'case with',err,'errors')
  def GI(V,E,ls=None,Directed=False,index=1):
      org_inp=[];g=[[] for i in range(V)]
      FromStdin=True if ls==None else False
      for i in range(E):
          if FromStdin:
              inp=LI()
              org_inp.append(inp)
          else:
              inp=ls[i]
          if len(inp)==2:a,b=inp;c=1
          else:a,b,c=inp
          if index==1:a-=1;b-=1
          aa=(a,c);bb=(b,c);g[a].append(bb)
          if not Directed:g[b].append(aa)
      return g,org_inp
  def RE(E):
      rt=[[]for i in range(len(E))]
      for i in range(len(E)):
          for nb,d in E[i]:
              rt[nb]+=(i,d),
      return rt
  def GGI(h,w,search=None,replacement_of_found='.',mp_def={'#':1,'.':0},boundary=1):
      #h,w,g,sg=GGI(h,w,search=['S','G'],replacement_of_found='.',mp_def={'#':1,'.':0},boundary=1) # sample usage
      mp=[boundary]*(w+2);found={}
      for i in R(h):
          s=input()
          for char in search:
              if char in s:
                  found[char]=((i+1)*(w+2)+s.index(char)+1)
                  mp_def[char]=mp_def[replacement_of_found]
          mp+=[boundary]+[mp_def[j] for j in s]+[boundary]
      mp+=[boundary]*(w+2)
      return h+2,w+2,mp,found
  def TI(n):return GI(n,n-1)
  def accum(ls):
      rt=[0]
      for i in ls:rt+=[rt[-1]+i]
      return rt
  def bit_combination(n,base=2):
      rt=[]
      for tb in R(base**n):s=[tb//(base**bt)%base for bt in R(n)];rt+=[s]
      return rt
  def gcd(x,y):
      if y==0:return x
      if x%y==0:return y
      while x%y!=0:x,y=y,x%y
      return y
  def YN(x):print(['NO','YES'][x])
  def Yn(x):print(['No','Yes'][x])
  def show(*inp,end='\n'):
      if show_flg:print(*inp,end=end)
  
  mo=10**9+7
  mo=998244353
  inf=float('inf')
  FourNb=[(-1,0),(1,0),(0,1),(0,-1)];EightNb=[(-1,0),(1,0),(0,1),(0,-1),(1,1),(-1,-1),(1,-1),(-1,1)];compas=dict(zip('WENS',FourNb));cursol=dict(zip('LRUD',FourNb))
  alp=[chr(ord('a')+i)for i in range(26)]
  #sys.setrecursionlimit(10**7)
  
  
  show_flg=False
  show_flg=True
  
  ans=0
  
  
  x,y=LI()
  
  def solve(x,y,p):
      if x==y or x[::-1]==y:
          return True
      nx=len(x)
      ny=len(y)
      if x[-1]!='0':
          if y.find(x)==-1 and y.find(x[::-1])==-1:
              return False
          d=ny-nx
          for l in range(ny-nx+1):
              if all([i=='1' for i in y[:l]]) and all([i=='1' for i in y[l+nx:]]) and y[l:l+nx]==x:
                  #show('1_1',x,y)
                  return True
          return False
          #show(d,x,y,ny-nx)
      else:
          rx=str(int(bin(int(x,2))[2:][::-1]))
          adx=(x+'1')[::-1]
          #show('else',rx,adx)
          return solve(rx,y,0) or solve(rx[::-1],y,0) or solve(adx,y,0) or solve(adx[::-1],y,0)
      return False
  Yn(solve(bin(x)[2:],bin(y)[2:],0))