#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<queue>
#include<stack>
using namespace std;
int main()
{
    char ss[5][5];
    int i,j,k=0;
    for(i=0;i<2;++i)
    scanf("%s",ss[i]);
    for(i=0;i<2;++i)
    {
        for(j=0;j<3;++j)
        {
            if(ss[i][j]!=ss[1-i][2-j])
            {
                k=1;
                break;
            }
        }
    }
    if(k)
        printf("NO\n");
    else printf("YES\n");
 return 0;   
}
