function Main(input)
{ 
	input = input.split("\n");

  if (input[0][0] == input[1][2] && input[0][2] == input[1][0] && input[0][1] == input[1][1])
    console.log("YES");
  else
    console.log("NO");
}

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