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