#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, r;
  bool test;
  cin >> s >> r;
  char x[s.size()];
  int counter = s.size() - 1;
  for (int i = 0; i < s.size(); i++) {
    x[counter] = s[i];
    counter--;
  }
  for (int i = 0; i < s.size(); i++) {
    if (x[i] == r[i]) {
      test = true;
    } else {
      test = false;
      break;
    }
  }
  if (test) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}
