n = int(input()) if(n == (True << True)): print("YES") exit() if(n == True): print("NO") exit() for i in range(True << True, n): if not(n % i): print("NO") exit() print("YES")