# List of known perfect numbers (the first few) perfect_numbers = {6, 28, 496, 8128, 33550336, 8589869056, 137438691328, 2305843008139952128} def is_perfect_number(N): return N in perfect_numbers # Taking input from the user N = int(input().strip()) # Read the input number if is_perfect_number(N): print("Yes") else: print("No")