#include <bits/stdc++.h>
using namespace std;
string a, b, j;
int x, y, z, i, d, h;
int main() {
  cin >> a >> b;
  for (i = a.size() - 1; i >= 0; i--) j += a[i];
  if (b == j)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
