#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, s2;
  cin >> s;
  cin >> s2;
  vector<char> v, t;
  for (int i = 0; i < s.length(); i++) {
    v.push_back(s[i]);
  }
  vector<char>::iterator it;
  int i = 0;
  for (it = v.end() - 1; it >= v.begin(); it--) {
    t.push_back(*it);
  }
  int cnt = 0, n = s.length();
  for (int i = 0; i < n; i++) {
    if (t[i] == s2[i]) cnt++;
  }
  if (cnt == n)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
