#include <bits/stdc++.h>
using namespace std;
int s(int x) {
  int y = 0;
  while (x) y++, x /= 10;
  return y;
}
long long n, z = 0, k, x;
int a[] = {4, 7, 44, 77, 47, 444, 447, 474, 477, 744, 777, 747, 744, 774};
int main() {
  long long T;
  T = 1;
  while (T--) {
    string s, a;
    cin >> s >> a;
    if (s.size() != a.size()) {
      cout << "NO\n";
      continue;
    }
    z = 0;
    for (int i = 0; i < s.size() && !z; i++) {
      if (a[i] != s[(int)s.size() - i - 1]) z++;
    }
    cout << ((!z) ? "YES" : "NO");
    cout << "\n";
  }
  return 0;
}
