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