#include <bits/stdc++.h>
using namespace std;
int main() {
  string sr1, str2, s;
  cin >> sr1 >> str2;
  reverse(sr1.begin(), sr1.end());
  if (sr1 == str2)
    cout << "YES";
  else
    cout << "NO";
}
