#include <bits/stdc++.h>
using namespace std;
int main() {
  int len = 0;
  char word[1000], word2[1000], temp[1000];
  scanf("%s", word);
  for (int i = 0; word[i] != '\0'; i++) {
    len++;
  }
  for (int i = 0; i < len / 2; i++) {
    swap(word[i], word[len - 1 - i]);
  }
  scanf("%s", word2);
  for (int i = 0; i < len; i++) {
    if (word[i] != word2[i]) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}
