#include <bits/stdc++.h>
using namespace std;
int main() {
  char s1[101], s2[101];
  int l1, l2, i;
  gets(s1);
  gets(s2);
  l1 = strlen(s1);
  l2 = strlen(s2);
  int kol = 0;
  if (l1 != l2) {
    cout << "NO";
  } else {
    for (i = 0; i < l1; i++)
      if (s1[i] != s2[l1 - i - 1]) kol = 1;
    if (kol == 1)
      cout << "NO";
    else
      cout << "YES";
  }
  return 0;
}
