def ok(a, b): while a: if (a & 1) and not (b & 1): return False a >>= 1 b >>= 1 return True a, b = [int(x) for x in input().split()] print("Yes" if ok(a, b) else "No")