import Data.List

main :: IO ()
main = do
    [a,b,c] <- map read.words <$> getLine :: IO [Int]
    putStrLn $ if (length(findIndices (==5) [a,b,c])==2 && length(findIndices (==7) [a,b,c])==1) then "YES" else "NO"
     
            