#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <string.h>
using namespace std;
char a[2][3];
char b[4],c[4],d[4];
int main()
{
    gets(b);
    gets(c);
    int len =strlen (c);
    int i,j;
    for ( i=0,j=len-1; i<len,j>=0 ; i++,j--)
    {
        d[i]=c[j];
    }
    if(strcmp(d,b)==0)
    {
        printf("YES\n");
    }
    else if (strcmp(d,b)!=0)
    {
        printf("NO\n");
    }
    return 0;
}