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