import Data.List ((\\))

main = do
    line <- fmap lines getContents
    mapM_ solve line

solve str = do
    let cards = map read.words $ str
    if acceptProb cards >= 0.5 then putStrLn "YES" else putStrLn "NO"

acceptProb :: [Int] -> Double
acceptProb reveals = fromIntegral (length (acceptapleCards reveals)) / fromIntegral (length ([1..10] \\ reveals))
acceptapleCards [c1,c2,c3] = filter (\x -> sum [c1,c2,x] <= 20) $ [1..10] \\ [c1,c2,c3]