module Main (main) where

import           Control.Monad
import qualified Data.ByteString.Char8     as C8
import           Data.Maybe

main :: IO ()
main = do
  [[s1], [s2]] <- replicateM 2 readStrings
  print . showAnswer $ solve (s1, s2)

type Input  = (String, String)
type Output = Bool

solve :: Input -> Output
solve (s1,s2) = s1 == reverse s2

showAnswer :: Output -> Answer
showAnswer = YesNo

-- utils
readStrings :: IO [String]
readStrings = map C8.unpack . C8.words <$> C8.getLine

-- readPair :: IO (Int, Int)
-- readPair = head . unfoldr readT <$> C8.getLine
--   where
--     readT = runStateT $
--       (,) <$> StateT (C8.readInt . C8.dropWhile isSpace)
--           <*> StateT (C8.readInt . B.unsafeTail)

data Answer
  = YesNo Bool
  | AB Bool
  | Number Int

instance Show Answer where
  show (YesNo b)  = if b then "Yes" else "No"
  show (AB b)     = if b then "A"   else "B"
  show (Number i) = show i