n = int(input()) m = 1 for i in range(2, n + 1): m *= pow(2, n) - 1 M = pow(2, n + 1) - 1 if m % M == 0: print("Yes") else: print("No")