function main (s) {
	s=s.split("\n");
	if(s[0][0]==s[1][2]&&s[0][2]==s[1][0]&&s[0][1]==s[1][1])console.log("YES\n");
	else console.log("NO\n");
}
 
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
