#include <bits/stdc++.h>
using namespace std;
int main() {
  string str, str2;
  int i;
  vector<char> v;
  vector<char> v2;
  cin >> str;
  cin >> str2;
  for (i = 0; str[i] != '\0'; i++) {
    v.push_back(str[i]);
  }
  for (i = 0; str2[i] != '\0'; i++) {
    v2.push_back(str2[i]);
  }
  reverse(v.begin(), v.end());
  if (v2 == v) {
    cout << "YES";
  } else {
    cout << "NO";
  }
}
