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