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