#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, 0, -1, 0, 1, 1, -1, -1};
int dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
void fast() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  fast();
  string s1, s2;
  cin >> s1 >> s2;
  bool f = true;
  for (int i = 0, j = s2.size() - 1; i < s1.size(), j >= 0; i++, j--) {
    if (s1[i] != s2[j]) {
      f = false;
    }
  }
  if (f == true)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
