function main(input){
  const a = input.trim().split('\n');
  const b = a[0].split('');
  const c = a[1].split('').reverse();
  if(b==c){
    console.log('YES');
  }else{
    console.log('NO');
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));