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