def solve(restCard, target)
  c = 0
  restCard.each{|bHand|
    deck = restCard.clone
    deck.delete(bHand)
    deck.to_a.each{|n| c+= 1 if n <= target}
  }
  return c.to_f / 42.0
end

while input = $stdin.gets
  h = input.split(" ")
  restCard = Array.new
  (1..10).each{|n|
    restCard << n if h.index(n.to_s) == nil
  }
  if solve(restCard, 20 - h[0].to_i - h[1].to_i) >= 0.5
    puts "YES"
  else
    puts "NO"
  end
end