#include <bits/stdc++.h>
using std::vector;
using std::cout;
using std::cin;
using std::string;
int main() {
	char a,b,c,x,d,e,f;
	bool flag=false;
	cin>>a>>b>>c>>d>>e>>f;
	if(a==f&&b==e&&c==d)
	    flag=true;
	if(flag){
	    cout<<"YES";
	}
	else
	    cout<<"NO";
	return 0;
}