#encoding:utf-8 No.0060 2014.12.11
while cards = gets.chomp.split.map{|item| item.to_i}
  stack = [1,2,3,4,5,6,7,8,9,10] - cards

  under20 = 0
  stack.each do |item|
    if cards[0] + cards[1] + item <= 20
      under20 += 1
    end
  end

  if under20 >= 4
    puts "YES"
  else
    puts "NO"
  end
end