require 'date' low = Date.new(1989, 1, 8) high = Date.new(2019, 4, 30) puts (low..high).cover?( Date.new(*gets.split.map(&:to_i)) ) ? :Yes : :No