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