#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int MAXN = 3e1 + 2;
const int INF = 0x3f3f3f3f;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  if ((int)s1.size() != (int)s2.size()) {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = 0, n = (int)s1.size(); i < n; ++i) {
    if (s1[i] != s2[n - 1 - i]) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
