#include<iostream>
using namespace std;
#include<string>
int main()
{
string str1, str2;
int nl, ng,work;
while (cin >> str1 >> str2)
{
work = 1;
nl = str1.length();
ng = str2.length();
if (nl == ng)
{
for (int i = 0; i < nl; i++)
{
if (str1[i] != str2[nl - i - 1])
{
work = 0;
break;
}
}
if (work == 1) cout << "YES" << endl;
else cout << "NO" << endl;
}
else cout << "NO" << endl;
str1.clear();
str2.clear();
}
return 0;
}