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