#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  while (cin >> s1 >> s2) {
    string str;
    str = "";
    for (int i = s2.size() - 1; i >= 0; i--) {
      str = str + s2[i];
    }
    if (str == s1) {
      cout << "YES" << endl;
    }
    if (str != s1) {
      cout << "NO" << endl;
    }
  }
  return 0;
}
