#include <bits/stdc++.h>
int main() {
  char str[1000];
  char b[1000];
  char temp;
  int i, j;
  scanf("%s%s", str, b);
  i = 0;
  j = strlen(str) - 1;
  while (i < j) {
    temp = str[i];
    str[i] = str[j];
    str[j] = temp;
    i++;
    j--;
  }
  if (strcmp(str, b) == 0) {
    printf("YES");
  } else {
    printf("NO");
  }
}
