#include <iostream>
#include <cstdio>
#include <cstdlib>

int main(int argc, char *argv[]) {
	char grid[2][3];
	for(int i=0;i<2;i++){
		for(int j=0;j<3;j++){
			scanf("%c",&grid[i][j]);
		}
		getchar();
	}
	int flag=0;
	for(int i=0;i<3;i++){
		
		if(grid[0][i]!=grid[1][2-i]){
			flag=1;
		}
	}
	if(flag) printf("NO");
	else printf("YES");
	return 0;
}