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