#include <bits/stdc++.h> using namespace std; string n,m; int main(){ cin>>n>>m; reverse(n.begin(),n.end()); if(n==m) printf("YES"); else printf("NO");//puts()默认有换行,只能输出字符串 return 0; }