import Data.List main = do str <- getLine let contain = str `isInfixOf` "575" putStrLn (if contain then "YES" else "NO")