const fs = require('fs')

function main(input) {
  const [src, target] = input.split('\n')  
  const result = String(src).split('').reverse().join('') === String(target) ? 'YES' : 'NO';

  console.log(result)
}

if (process.env.DEBUG && process.argv.length > 1) {
  main(fs.readFileSync(process.argv[2], 'utf8'))
} else {
  main(fs.readFileSync('/dev/stdin', 'utf8'))
}