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