#include <bits/stdc++.h>
using namespace std;
bool comp(int a, int b) { return a > b; }
void solve() {
  string s;
  cin >> s;
  string check;
  cin >> check;
  string rev = "";
  for (int i = s.length() - 1; i >= 0; i--) {
    rev += s[i];
  }
  if (rev == check)
    cout << "YES";
  else
    cout << "NO";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
}
