defmodule Main do def is_heisei(y, m, d) do x = y * 10000 + m * 100 + d x >= 19890108 && x <= 20190430 end def solve(y, m, d) do case is_heisei(y, m, d) do true -> "Yes" _ -> "No" end end def main do [y, m, d] = IO.gets("") |> String.trim |> String.split |> Enum.map(&String.to_integer/1) solve(y, m, d) |> IO.puts end end