require "date" s = Date.new(1989,1,8) e = Date.new(2019,4,30) input = gets.chomp.split(" ").map { |i| i.to_i } now = Date.new(input[0],input[1],input[2]) if now >= s and e >= now puts "Yes" else puts "No" end