#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  int l, i, j, f = 0;
  getline(cin, s);
  getline(cin, t);
  for (l = 0; s[l] != '\0'; l++)
    ;
  for (i = 0, j = l - 1; s[i] != '\0'; i++, j--)
    if (s[i] - t[j] > 0) {
      f = 1;
      break;
    }
  if (f == 1)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
