#include <bits/stdc++.h>
using namespace std;
int main() {
  string x, y;
  cin >> x >> y;
  int s = x.size();
  int r = s - 1;
  bool c = true;
  for (int i = 0; i < s; i++) {
    if (x[i] == y[r]) {
      c = true;
    } else if (x[i] != y[r]) {
      c = false;
      break;
    }
    r--;
  }
  if (c == true) {
    cout << "YES";
  } else if (c == false)
    cout << "NO";
  return 0;
}
