def divisors(n): res_low, res_high = [], [] i = 1 while i * i <= n: if n % i == 0: res_low.append(i) if i != n // i: res_high.append(n // i) i += 1 return res_low + res_high[::-1] N = int(input()) dv = divisors(N) if sum(dv) == 2*N: print('Yes') else: print('No')