#include <bits/stdc++.h>
using namespace std;
int heap(int a, int t) {
  int tmp;
  if (a > t) swap(a, t);
  if (t % a == 0) return a;
  return heap(a, t % a);
}
int main() {
  string x, y;
  cin >> x >> y;
  bool f = true;
  for (int i = 0; i < x.size(); i++) {
    if (x[i] != y[x.size() - 1 - i]) f = false;
  }
  if (f)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
