#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  bool isPalindrome = true;
  long long i, l1, l2;
  string s, t;
  cin >> s;
  cin >> t;
  l1 = s.length();
  l2 = t.length();
  if (l1 != l2)
    isPalindrome = false;
  else {
    for (i = 0; i < l1; i++) {
      if (s[i] != t[l1 - i - 1]) {
        isPalindrome = false;
        break;
      }
    }
  }
  cout << (isPalindrome ? "YES" : "NO") << endl;
  return 0;
}
