"use strict"

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

  let ans = "NO"
  if (input[0] == input[5] && input[1] == input[4] && input[2] == input[3])
    ans == "YES"

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