#include <bits/stdc++.h>
using namespace std;
const string space = " ";
const long long int maxx = (1e7 + 7);
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s, m;
  cin >> s >> m;
  reverse(s.begin(), s.end());
  if (s == m)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
