-- We love math.
import Control.Applicative
shichigosan :: Int -> String
shichigosan 3 = "YES"
shichigosan 5 = "YES"
shichigosan 7 = "YES"
shichigosan x = "NO"
main :: IO ()
main = do
    a <- readLn
    --整数

    putStrLn (shichigosan a)
