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