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