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