import std.stdio;
import std.string;
import std.algorithm;
import std.range;
import std.conv;

void main()
{
	string a = readln.chomp;
	string b = readln.chomp;

	if (a.retro.text == b) writefln!"YES";
	else writefln!"NO";
}