N = int(input()) t = 1 n = N for i in range(2,10 ** 6 + 1): if n % i == 0: count = 1 n //= i while n % i == 0: n //= i count += 1 t *= (i ** (count + 1) - 1) // (i - 1) if n > 1: t *= (n + 1) if t == N + N: print('Yes') else: print('No')