main = do
  line1 <- getLine
  line2 <- getLine
  putStrLn $ getAns line1 line2

getAns :: String -> String -> String
getAns line1 line2
  | reverse line1 == line2 = "YES"
  | otherwise                    = "NO"