{-# LANGUAGE OverloadedStrings #-}

import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as B
import Data.Attoparsec.ByteString.Char8

newtype Input = Input { _X :: Int }
newtype Output = Output { unOutput :: ByteString }

inputParser :: Parser Input
inputParser = Input <$> decimal

instance Show Output where
  show = B.unpack . unOutput

main :: IO ()
main = do
  result <- parseWith B.getContents inputParser ""
  case result of
    Done _ input -> print $ solve input
    _            -> putStrLn "parse error"

solve :: Input -> Output
solve input = Output $ if (_X input) `elem` [7, 5, 3]
  then "YES"
  else "NO"