import java.util.Scanner

object Main {
  def main(args:Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val cell0 = sc.nextLine()
    val cell1 = sc.nextLine()

    if (cell0 == cell1.reverse && cell0.reverse == cell1) {
      println("YES")
    } else {
      println("NO")
    }
  }
}