#include <bits/stdc++.h>
using namespace std;
int main() {
  int ok = 0;
  string s, s2;
  cin >> s >> s2;
  if (s.size() == s2.size()) {
    for (int i = 0; i < s.size(); i++) {
      if (s[i] != s2[s.size() - i - 1]) ok = 1;
    }
  } else
    ok = 1;
  if (ok == 0)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
