N = int(input()) ans = 1 for i in range(2,int(N**0.5)+1): if N%i == 0: ans += i if N//i != i: ans += N//i if ans == N: print("Yes") else: print("No")