#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[105], b[105];
  cin >> a;
  cin >> b;
  int len = strlen(a), i;
  for (i = 0; i < len; i++)
    if (a[i] != b[len - 1 - i]) break;
  if (len != i)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
