#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, y, z;
  cin >> s >> y;
  z = s;
  reverse(s.begin(), s.end());
  if (s == y) {
    cout << "YES";
  } else {
    cout << "NO";
  }
}
