#include <bits/stdc++.h>
using namespace std;
template <typename T, typename TT>
ostream& operator<<(ostream& os, const pair<T, TT>& t) {
  return os << t.first << " " << t.second;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& t) {
  for (auto& i : t) os << i << " ";
  return os;
}
int main() {
  string s1;
  string s2;
  cin >> s1 >> s2;
  int i = s1.length();
  for (int j = 0, k = i - 1; j < i; j++, k--) {
    if (s1[j] != s2[k]) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
