#include <bits/stdc++.h>
using namespace std;
long long revNumber(long long n) {
  long long b = 0;
  while (n != 0) {
    b = b * 10 + n % 10;
    n /= 10;
  }
  return b;
}
long long leapYearCheck(long long year) {
  if (year % 4 != 0)
    return 0;
  else if (year % 100 != 0)
    return 1;
  else if (year % 400 != 0)
    return 0;
  else
    return 1;
}
long long countDivisor(long long n) {
  long long ck = 0;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ck++;
      if (i != n / i) ck++;
    }
  }
  return ck;
}
long long primeFactorsCount(long long n) {
  long long gf = 0;
  while (n % 2 == 0) {
    gf++;
    n = n / 2;
  }
  for (long long i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      gf++;
      n = n / i;
    }
  }
  if (n > 2) {
    gf++;
  }
  return gf;
}
long long factorial(long long n) {
  if (n == 1) return 1;
  return n * factorial(n - 1);
}
long long binarySearch(long long high, long long sV, long long arr[]) {
  long long low = 0;
  while (low <= high) {
    long long mid = (high + low) / 2;
    if (sV == arr[mid])
      return mid + 1;
    else if (sV > arr[mid])
      low = mid + 1;
    else
      high = mid - 1;
  }
  return -1;
}
bool checkPrime(int n) {
  int i;
  if (n <= 1) return false;
  for (i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
void swap(int *x, int *y) {
  int t = *x;
  *x = *y;
  *y = t;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s, s1;
  cin >> s >> s1;
  int flag = 0;
  for (int i = 0, j = s1.size() - 1; i < s.size(), j >= 0; ++i, --j) {
    if (s[i] - s1[j] != 0) {
      flag = 1;
      break;
    }
  }
  flag == 1 ? cout << "NO\n" : cout << "YES\n";
  return 0;
}
