import scala.io.StdIn._
 
object Main extends App{
  val sc = new java.util.Scanner(System.in)
  val g = sc.next
  val r = sc.next
  if(g(0)==r(2) && g(1)==r(1) && g(2)==r(0)){
    println("YES")
  }
  else{
    println("NO")
  }
}