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