#include <bits/stdc++.h>
using namespace std;
string s, t;
int main() {
  ios::sync_with_stdio(false);
  cin >> s >> t;
  reverse(s.begin(), s.end());
  if (s == t) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
