while line = gets
    c1, c2, c3 = line.chomp.split.map(&:to_i)
    arr = (1..10).to_a
    arr.delete c1
    arr.delete c2
    arr.delete c3
    limit = 20 - c1 - c2
    count = arr.count{|x| x <= limit}
    puts count >= 4 ? "YES" : "NO"
end

