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