require 'date' m, d, k = gets.split.map(&:to_i) e = Date.new(2022, m,d) cnd = [] 7.times do |i| f = e + i f.strftime("%m%d").to_s.chars.each do |j| cnd << j end end cnt = cnd.uniq.count puts cnt >= k ? "Yes" : "No"