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