import math def pop_count(k): count = 0 for i in range(k.bit_length()): if k >> i & 1 == 1: count += 1 return count x = int(input()) if x != 0 and x != 1 and x != 2: for m in range(math.ceil(math.log2(x))+1): n = m ^ x if pop_count(n) == m: print("Yes") break else: print("No") else: if x == 2: print("No") else: print("Yes")