#include <bits/stdc++.h>
using namespace std;
string a;
string b;
string c;
int i = 0;
int x = 0;
int m = 0;
int t = 0;
int s = 0;
int z = 0;
int main() {
  cin >> a;
  cin >> b;
  s = a.size();
  c = a;
  for (i = 1; i <= s; i++) {
    c[s - i] = a[i - 1];
  }
  for (i = 0; i < s; i++) {
    if (c[i] == b[i]) {
      z++;
    }
  }
  if (z == s) {
    cout << "YES";
  } else {
    cout << "NO";
  }
}
