#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s, t;
  cin >> s >> t;
  bool f = true;
  for (long long int i = 0; i < s.length(); i++) {
    if (s[i] != t[s.length() - 1 - i]) f = false;
  }
  if (f)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
