import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.regex : regex;
import std.container;
import std.bigint;
import std.ascii;


void main()
{
  auto c1 = readln.chomp;
  auto c2 = readln.chomp;

  if (c1[0] == c2[2] && c1[1] == c2[1] && c1[2] == c2[0]) {
    writeln("YES");
  } else {
    writeln("NO");
  }
}
