import Data.List
main = do
    inps <- words <$> getLine
    let haiku = sort(map (read :: String -> Int) inps) == [5,5,7]
    case haiku of
        True -> putStrLn "YES"
        _    -> putStrLn "NO"