#include <bits/stdc++.h>
int main() {
  char arr1[103];
  char arr2[103];
  int s1, s2, i, k, j, flag = 1;
  gets(arr1);
  gets(arr2);
  s1 = strlen(arr1);
  s2 = strlen(arr2);
  if (s1 != s2) {
    printf("NO");
    return 0;
  }
  i = 0;
  j = strlen(arr1) - 1;
  for (k = 0; k < s1; k++) {
    if (arr1[i] != arr2[j]) {
      flag = 0;
      break;
    }
    i++;
    j--;
  }
  if (flag == 1)
    printf("YES");
  else
    printf("NO");
  return 0;
}
