require 'date' minDate = Date.new(1989,1,8) maxDate = Date.new(2019,4,30) y,m,d=gets.split.map(&:to_i) date = Date.new(y,m,d) if minDate<=date && date<=maxDate puts "Yes" else puts "No" end