import Data.List ((\\)) main = do a <- getLine b <- getLine putStrLn $ if null (a\\b) && null (b\\a) then "YES" else "NO"