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

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