import Control.Monad rInt :: String -> Int rInt = read split_char c [] = [] split_char c str = w : split_char c (case xs of "" -> []; _ -> tail xs) where (w, xs) = break (==c) str main = replicateM 2 getLine >>= putStrLn . solve . map ((map rInt) . split_char '.') where solve [k, v] | k >= v = "YES" | otherwise = "NO"