function Main(input) {
  const array = input.split('\n').map(e => e.split(' '));
  if (array[0][0] === array[1][2] && array[0][1] === array[1][1] && array[0][2] === array[1][0]) {
    console.log('YES');
  } else {
    console.log('NO');
  }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));