#include <bits/stdc++.h>
int main() {
  char s[100];
  char c;
  int n = 0;
  while ((c = getchar()) != '\n') s[n++] = c;
  while ((c = getchar()) != '\n')
    if (s[--n] != c) {
      printf("NO");
      return 0;
    }
  printf("YES");
  return 0;
}
