#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, m;
  cin >> s >> m;
  bool test = true;
  int j = s.size();
  for (int i = 0; i < s.size(); i++) {
    j--;
    if (s[i] != m[j]) {
      test = false;
    }
  }
  if (s.size() != m.size()) {
    test = false;
  }
  if (test == true) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
