#include <bits/stdc++.h>
using namespace std;
int arr[11] = {0};
void zero() {
  for (int i = 0; i < 11; i++) {
    arr[i] = 0;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s, s2;
  cin >> s >> s2;
  reverse(s2.begin(), s2.end());
  if (s == s2) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
