from sys import stdin from math import sqrt n = int(stdin.readline()) a = 2 res = False for i in range(1, 31): if (2 ** (i - 1)) * (2 ** i - 1) == n: res = True break if res: print("Yes") else: print("No")