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