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