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