#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  reverse(a.begin(), a.end());
  int x = a.length();
  for (int i = 0; i < x; i++) {
    if (a[i] == b[i]) {
      continue;
    } else {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
