import Data.List
import Control.Monad
import Control.Applicative

main::IO()
main = do
  a <- filter(/=5)<$>map(read::[Char]->Int)<$>words<$>getLine
  print $ if head a == 7 && length a == 1 then "YES" else "NO"
