import Control.Applicative
import Control.Monad
import Data.List
import Data.Array

main = do
  n <- (read::String -> Int) <$> getLine
  putStrLn $ case n of
    3 -> "YES"
    5 -> "YES"
    7 -> "YES"
    _ -> "NO"
    
