#include #include #include

using namespace std;

int isRevertStr(const char *str1,const char *str2) { int nResult = 0; string strS1 = str1; string strS2 = str2; reverse(strS1.begin(), strS1.end());

if(strS1 == strS2)
    nResult = 1;

return nResult;

}

int main() { string strS1, strS2; while(cin >> strS1 >> strS2) { cout << isRevertStr(strS1.data(), strS2.data()) << endl; } }