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