{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}

main :: IO ()
main = do
  x <- readLn
  putStrLn $ if solve x then "YES" else "NO"

solve :: Int -> Bool
solve 7 = True
solve 5 = True
solve 3 = True
solve _ = False
