#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[101], str1[101];
  int len = 0, len1 = 0;
  cin >> str >> str1;
  for (int i = 0; str[i] != '\0'; i++) {
    len++;
  }
  for (int j = 0; str1[j] != '\0'; j++) {
    len1++;
  }
  if (len1 != len) {
    cout << "NO";
  } else {
    int flag = 0;
    for (int i = 0, j = len1 - 1; i < len; i++, j--) {
      if (str[i] != str1[j]) {
        flag = 1;
        break;
      }
    }
    if (flag == 0) {
      cout << "YES";
    } else {
      cout << "NO";
    }
  }
}
