// MC0218小码哥的开心数字
#include <iostream>
#include <algorithm>
using namespace std;
string x;
int a,b;
int main()
{
cin>>x;
a = stoi(x); //stoi() 字符串转整形 并且可以去除前导0
reverse(x.begin(),x.end());
cout<<stoi(x)<<endl;
if(stoi(x)<a)
{
cout<<"False"<<endl;
} else {
cout<<"True"<<endl;
}
return 0;
}