import Control.Applicative main :: IO () main = solve <$> f >>= putStrLn where f = map read <$> words <$> getLine solve :: [Int] -> String solve [h, m] | t < 450 = "Yes" | t < 510 = "Late" | otherwise = "No" where t = h * 60 + m