loop do
	num=gets.chomp.split(" ")
	num.map!(&:to_i)
	if num==[]
		break
	end
	
	card = [1,2,3,4,5,6,7,8,9,10]
	
	card.delete_if{|x| x==num[0] || x==num[1] || x==num[2]}
	
	okay=0
	for y in 0..card.size-1
		if num[0] + num[1] + y <= 20
			okay+=1
		end
	end
	
	if okay/7 >= 0.5
		puts "YES"
	else
		puts "NO"
	end
end