S = set() for i in range(2, 30): S.add(2**(i-1) * (2**i - 1)) print("Yes") if int(input()) in S else print("No")