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