import Control.Applicative ((<$>), (<*>)) import Data.List.Split (splitOn) main :: IO () main = do solve <$> getLine <*> getLine >>= putStrLn solve :: String -> String -> String solve x y | (f x) >= (f y) = "YES" | otherwise = "NO" where f = map read . splitOn "." :: String -> [Int]