import Data.List main :: IO() main = getContents >>= putStrLn.(\[a, b] -> if a == b then "YES" else "NO").map sort.lines