alphacademy-cpp/quito/11.1.cpp

23 lines
555 B
C++
Raw Normal View History

2023-02-01 14:16:01 +00:00
#include <bits/stdc++.h>
using namespace std;
int main () {
string compare, compare2;
cin >> compare >> compare2;
if (compare.length() == compare2.length() ) {
int i2 = compare.length()-1;
for (int i = 0; i < compare.length(); i++) {
//cout<<endl;
//cout<<compare[i]<<' '<<compare2[i2]<<endl;
if (compare[i] != compare2[i2]) {
cout<<"NO";
return 0;
}
i2--;
}
cout<<"YES";
return 0;
}
cout<<"NO";
}