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