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