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