while line = gets
  nums = line.split(" ").map(&:to_i)
  remains = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] - nums

  draw_decision = nums[0] + nums[1] + remains[3]

  puts draw_decision <= 20 ? "YES" : "NO"
end