#include <bits/stdc++.h>
using namespace std;
int main() {
  char arr1[100], arr2[100];
  int a;
  bool x = false;
  cin >> arr1 >> arr2;
  a = strlen(arr1);
  for (int i = 0; i < a; i++) {
    if (arr1[i] == arr2[strlen(arr2) - 1 - i])
      x = true;
    else {
      x = false;
      break;
    }
  }
  if (x == true)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
