object Main {
  def main(args: Array[String]) {
    val sc = new java.util.Scanner(System.in)
    val c1 = sc.next
    val c2 = sc.next

    val ans = if (c1 == c2.reverse) {
      "YES"
    } else {
      "NO"
    }

    println(ans)

  }
}
