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