#include <bits/stdc++.h>
int main() {
  char s1[100000] = {'\0'}, s2[100000] = {'\0'};
  scanf("%s%s", s1, s2);
  int l1 = strlen(s1);
  int l2 = strlen(s2);
  int j = 0, t[100000] = {'\0'};
  for (int i = l2 - 1; i >= 0; i--) {
    t[j] = s2[i];
    j++;
  }
  int flag = 1;
  for (int i = 0; i < l1 & i < l2; i++) {
    if (s1[i] != t[i]) flag = 0;
  }
  if (flag)
    printf("YES");
  else {
    printf("NO");
  }
}
