#include <bits/stdc++.h>
using namespace std;
int main() {
  string berl, birl;
  cin >> berl >> birl;
  bool crr = true;
  int n = berl.length();
  for (int i = 0; i < n; i++)
    if (birl[i] != berl[n - 1 - i]) crr = false;
  cout << (crr == false ? "NO" : "YES");
}
