function Main(input) {
  input = input.split("\n");
  var l1 = input[0];
  var l2 = input[1];
  var a = l1.substr(0,1);
  var b = l1.substr(1,1);
  var c = l1.substr(2,1);
  var d = l2.substr(0,1);
  var e = l2.substr(1,1);
  var f = l2.substr(2,1);
  var ans="NO";
  if(a==f&&b==e&&c==d){
    ans="YES";
  }
  console.log('%s', ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));