import Control.Applicative main :: IO () main = solve <$> f >>= putStrLn where f = map read <$> words <$> getLine solve :: [Int] -> String solve [y, m, d] | y < 1989 = "No" | y == 1989 && m == 1 && d < 8 = "No" | y < 2019 = "Yes" | y == 2019 && m <= 4 = "Yes" | otherwise = "No"