#include <bits/stdc++.h>
using namespace std;
long long int isprime(long long int n) {
  for (long long int i = 2; i * i <= n; i++) {
    if (n % i == 0) return 0;
  }
  return 1;
}
void solve() {
  string s;
  cin >> s;
  string a;
  cin >> a;
  long long int f = 0;
  reverse(a.begin(), a.end());
  if (s == a)
    cout << "YES";
  else
    cout << "NO";
}
signed main() { solve(); }
