open System let (|Heisei|_|) date = let heisei_begin = new DateTime(1989, 1, 8) let heisei_end = new DateTime(2019, 4, 30) if heisei_begin <= date && date <= heisei_end then Some(Heisei) else None let input = let t = stdin.ReadLine().Split() |> Array.map int new DateTime(t.[0], t.[1], t.[2]) input |> function | Heisei x -> "Yes" | _ -> "No" |> stdout.WriteLine