#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
void solve() {
  string a, b;
  cin >> a;
  cin >> b;
  int flag = 1;
  if (a.length() == b.length()) {
    for (int i = 0; i <= a.length() - 1; i++) {
      if (a[i] != b[b.length() - 1 - i]) {
        flag = 0;
        break;
      }
    }
  } else {
    flag = 0;
  }
  if (flag == 0) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
