import scala.io.StdIn

object Main extends App {
  
   val s1 = StdIn.readLine()
   val s2 = StdIn.readLine()
   println(
      if(s1(0) == s2(2) &&
        s1(2) == s2(0) &&
        s1(1) == s2(1)) "YES"
      else "NO"
   )
}
