#include <bits/stdc++.h>
using namespace std;
int main() {
  string S, M;
  cin >> S >> M;
  int l1 = S.length(), l2 = M.length();
  char c;
  if (l1 == l2) {
    reverse(M.begin(), M.end());
    if (S == M)
      cout << "YES";
    else
      cout << "NO";
  } else
    cout << "NO";
  return 0;
}
