N = int(input()) ans = "YES" one = "a".count('a') two = "aa".count('a') if N == one: ans = "NO" else: for n in range(two, N): if not bool(N % n): ans = "NO" print(ans)