require 'date' y, m, d = gets.split.map(&:to_i) puts (Date.new(1989, 1, 8)..Date.new(2019, 4, 30)).member?(Date.new(y, m, d)) ? :Yes : :No