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