p = [2, 3, 5, 7, 13, 17, 19, 31] P = [] for x in p: P.append(((1 << x) - 1) << (x - 1)) N = int(input()) print("Yes" if N in P else "No")