class Date def heisei? = (Date.new(1989, 1, 8)..Date.new(2019, 4, 30)) === self end class TrueClass def to_s = "Yes" end class FalseClass def to_s = "No" end require "date" puts Date.new(*gets.split(" ").map(&:to_i)).heisei?