#include <bits/stdc++.h>
using namespace std;
bool compare(pair<int, int> a, pair<int, int> b) { return a.first < b.first; }
int main() {
  string s, t;
  cin >> s >> t;
  reverse(s.begin(), s.end());
  if (s == t)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
