import std.stdio;
import std.string;
import std.array; // split
import std.conv; // to

void main()
{
   string n = chomp(readln());
   string m = chomp(readln());
   if(n[0] == m[2] && n[1] == m[1] && n[2] == m[0]){
       writeln("YES");
   } else {
       writeln("NO");
   }
}