N = int(input()) if N == 1: print("NO") exit() for i in range(2,N): if N%i == 0: print("NO") exit() print("YES")