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