#include <bits/stdc++.h>
using namespace std;
int main() {
  int sum = 0;
  string n, t;
  cin >> n >> t;
  stack<char> q, x;
  for (int i = 0; i < n.length(); i++) q.push(n[i]);
  for (int i = t.length() - 1; i >= 0; i--) x.push(t[i]);
  for (int i = 0; i < n.length(); i++)
    if (q.top() == x.top()) {
      sum++;
      q.pop();
      x.pop();
    }
  if (sum == n.length())
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
