{-# LANGUAGE OverloadedStrings #-}
import qualified Data.ByteString.Char8 as BSC8
import qualified Data.Vector.Unboxed   as VU
import qualified Control.Arrow         as Arrow


getI :: BSC8.ByteString -> Maybe (Int, BSC8.ByteString)
getI = fmap (Arrow.second BSC8.tail) . BSC8.readInt
getABC :: IO (Int, Int, Int)
getABC = (\vec -> (vec VU.! 0, vec VU.! 1, vec VU.! 2)) . VU.unfoldrN 3 getI <$> BSC8.getLine

main :: IO ()
main = do
  (a, b, c) <- getABC
  BSC8.putStrLn $ solver a b c

solver :: Int -> Int -> Int -> BSC8.ByteString
solver a b c
  | a == 5 && b == 5 && c == 7 = "YES"
  | a == 5 && b == 7 && c == 5 = "YES"
  | a == 7 && b == 5 && c == 5 = "YES"
  | otherwise                  = "NO"
