import Data.List
main = do
    line <- getLine
    let ws = words line
        xs = fmap (read :: String -> Int) ws in
          if [5, 5, 7] == (sort xs)
            then putStrLn "YES"
            else putStrLn "NO"
