require "date" temp = gets.split(" ") date = Date.new(temp[0].to_i,temp[1].to_i,temp[2].to_i); if date >= Date.parse("1989-1-8") && Date.parse("2019-4-30") >= date puts "Yes" else puts "No" end