main :: IO () main = interact $ solve . words solve :: [String] -> String solve [s, t] = if a >= b then "YES" else "NO" where xs = map (read :: String -> Int) $ words $ map (\x -> if x == '.' then ' ' else x) s ys = map (read :: String -> Int) $ words $ map (\x -> if x == '.' then ' ' else x) t [ka,se,ki] = xs [ha,te,na] = ys a = ka * 100000000 + se * 10000 + ki b = ha * 100000000 + te * 10000 + na