def is_divisible_by_mn_plus_1(n): # Compute M_n = 2^n - 1 m_n = (1 << n) - 1 # 1 << n is the same as 2^n # Compute product of M_2 to M_(N+1) product = 1 for i in range(2, n + 1): product *= (1 << i) - 1 # Compute M_(N+1) m_n_plus_1 = (1 << (n + 1)) - 1 # print(m_n_plus_1) # print(product) # Check if the product is divisible by M_(N+1) if product % m_n_plus_1 == 0: return "Yes" else: return "No" # Read input n = int(input()) # Get the result result = is_divisible_by_mn_plus_1(n) # Print the result print(result)