open System open System.IO let readStr () = Seq.initInfinite <| fun _ -> Console.Read () |> Seq.skipWhile (fun c -> if c = -1 then raise <| EndOfStreamException () else char c |> Char.IsWhiteSpace) |> Seq.takeWhile (fun c -> c <> -1 && char c |> Char.IsWhiteSpace |> not) |> Seq.map char |> Seq.toArray |> fun cs -> new string (cs) let inline read () = (^a : (static member Parse : string -> ^a) readStr ()) open System.Globalization let calender = JapaneseCalendar () let endOfHeisei = DateTime (2019, 4, 30) let y = read () let m = read () let d = read () let date = DateTime (y, m, d) let ans = if calender.GetEra date = 4 && date <= endOfHeisei then "Yes" else "No" Console.WriteLine ans