function Main(input) {
	input = input.trim();
	//input = input.trim().split(" ");
	input = input.trim().split("\n");
	//input = input.trim().split(" ").map((a)=>Number(a));
	//input = input.trim().split("\n").map((a)=>Number(a));
  	var c1 = input[0].split("");
  var c2 = input[1].split("");
  
  if(c1[0] == c2[2] && c1[1] == c2[1] && c1[2] == c2[0]){
     console.log("YES");
     }else{
     console.log("NO");
     }
}

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