#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(NULL);
  ios::sync_with_stdio(0);
  string a, b;
  cin >> a >> b;
  int ans = 0;
  for (int i = 0, j = a.length() - 1; i < a.length(), j != -1; i++, j--) {
    if (a[j] == b[i]) {
    } else {
      ans++;
    }
  }
  if (ans == 0) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
