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