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