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