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