{-# LANGUAGE BangPatterns, FlexibleContexts #-}

import Control.Applicative
import Control.Monad
import Control.Monad.ST
import Data.Array
import Data.Array.ST
import Data.List
import Debug.Trace (traceShow, traceShowM)
import qualified Data.ByteString.Char8 as B

readi b | Just (n, _) <- B.readInt b = n

main :: IO ()
main = do
    x <- readLn :: IO Int
    case x of
        7 -> putStrLn "YES"
        5 -> putStrLn "YES"
        3 -> putStrLn "YES"
        _ -> putStrLn "NO"