import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val t = (1..2).map { sc.next() }
    println(if (t[0][0]==t[1][2] && t[1][0]==t[0][2] && t[0][1]==t[1][1]) "YES" else "NO")
}