"use strict"

function main(input) {
  input = input.split(/\n/)

  let ans = "NO"
  if (
    input[0][0] == input[1][2] &&
    input[0][1] == input[1][1] &&
    input[0][2] == input[1][0]
  ) {
    ans = "YES"
  }

  console.log(ans)
}
main(require("fs").readFileSync("/dev/stdin", "utf8"))