#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string s, t;
  int b = 0;
  cin >> s >> t;
  int n = s.length() - 1;
  for (int i = 0; i <= n; i++) {
    if (s[i] == t[n - i]) {
      b++;
    }
  }
  if (b == s.length())
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
