N = int(input()) perfect_numers = {6, 28, 496, 8128, 33550336, 8589869056, 137438691328} if N in perfect_numers: print('Yes') else: print('No')