#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  string t;
  cin >> t;
  string w;
  reverse(s.begin(), s.end());
  for (int i = 0; i < s.length(); i++) {
    w += s[i];
  }
  if (t == w) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}
