#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  string stri;
  cin >> str;
  cin >> stri;
  int n = str.size();
  int m = stri.size() - 1;
  int bandera = 0;
  for (int i = 0; i < n; i++) {
    if (str[i] == stri[m]) {
      bandera++;
    }
    m--;
  }
  if (bandera == n) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
