import math n=int(input()) if not n or not ~-n:print('NO');exit() for i in range(int(math.e),n): if not n%i:print('NO');exit() else:print('YES')