import Control.Applicative ((<$>)) import Data.List main :: IO () main = do solve <$> getLine >>= putStrLn solve :: String -> String solve = f . isInfixOf "575" where f b | b = "YES" | otherwise = "NO"