import std.stdio;
import std.string;
import std.conv;
import std.bigint;
import std.typecons;
import std.algorithm;
import std.array;
 
void main() {
    auto a = readln.chomp.dup;
    auto b = readln.chomp.dup;
    reverse(b);
    writeln(a == b ? "YES" : "NO");
}
