import Data.List
import Data.Bits
import Text.Printf
import Text.Regex
import Data.Function
import Data.List.Split
import Control.Monad

main = do
  [a,b] <- replicateM 2 getLine :: IO [String]
  putStrLn $ if reverse a == b then "YES" else "NO"