import scala.io.StdIn._

object Main {
  def main(args: Array[String]): Unit = {
    val s1 = readLine
    val s2 = readLine
    if (s1(0) == s2(2) && s1(1) == s2(1) && s1(2) == s2(0)) {
      println("YES")
    }else{
      println("NO")
    }

  }


}
