#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int count = 0, n1 = a.size(), n2 = b.size();
  int i, j;
  if (n1 != n2) {
    cout << "NO" << endl;
  } else {
    int n = n1;
    for (i = 0, j = n - 1; i < n; i++, j--) {
      if (a[i] == b[j]) count++;
    }
    if (count == n1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
