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