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