#include <bits/stdc++.h>
int main() {
  int i, j, n, count = 0;
  char word[101], translate[101];
  scanf("%s%s", word, translate);
  n = strlen(word);
  for (i = 0; i < n; i++) {
    if (word[i] == translate[n - i - 1])
      count++;
    else
      continue;
  }
  if (count == n)
    printf("YES");
  else
    printf("NO");
  return 0;
}
