'use strict'

function main(s) {

  s = s.split('\n');
  const row1 = s[0];
  const row2 = s[1];
  let ans = (s[0] === s[1].split('').reverse().join(''));

  console.log(ans ? 'YES' : 'NO');
}

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