object Main extends App {
	val a = scala.io.StdIn.readLine.toArray
	val b = scala.io.StdIn.readLine.toArray

	var flag = true

	for(i<-0 until a.size){
		if(a(i) != b(2-i)) flag = false
	}

	if(flag) println("YES")
		else println("NO")

}