#include <iostream>
#include <string>
#include <map>
using namespace std;
unsigned IsPalindrome(unsigned num)
{
unsigned num_2=0;
while(num)
{
num_2=num_2*10+num%10;
num=num/10;
}
return num_2;
}
int main(void)
{
unsigned num=1221;
if(IsPalindrome(num) == num)
{
cout<<"Yes"<<endl;
}
else
{
cout<<"No"<<endl;
}
num=1223;
if(IsPalindrome(num) == num)
{
cout<<"Yes"<<endl;
}
else
{
cout<<"No"<<endl;
}
num=12321;
if(IsPalindrome(num) == num)
{
cout<<"Yes"<<endl;
}
else
{
cout<<"No"<<endl;
}
num=12322;
if(IsPalindrome(num) == num)
{
cout<<"Yes"<<endl;
}
else
{
cout<<"No"<<endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8bWFwPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnVuc2lnbmVkIElzUGFsaW5kcm9tZSh1bnNpZ25lZCBudW0pCnsKICAgIHVuc2lnbmVkIG51bV8yPTA7CiAgICB3aGlsZShudW0pCiAgICB7CiAgICAgICAgbnVtXzI9bnVtXzIqMTArbnVtJTEwOwogICAgICAgIG51bT1udW0vMTA7CiAgICB9CiAgICByZXR1cm4gbnVtXzI7Cn0KCmludCBtYWluKHZvaWQpCnsKICAgIHVuc2lnbmVkIG51bT0xMjIxOwogICAgaWYoSXNQYWxpbmRyb21lKG51bSkgPT0gbnVtKQogICAgewogICAgICAgIGNvdXQ8PCJZZXMiPDxlbmRsOwogICAgfQogICAgZWxzZQogICAgewogICAgICAgIGNvdXQ8PCJObyI8PGVuZGw7CiAgICB9CiAgICBudW09MTIyMzsKICAgIGlmKElzUGFsaW5kcm9tZShudW0pID09IG51bSkKICAgIHsKICAgICAgICBjb3V0PDwiWWVzIjw8ZW5kbDsKICAgIH0KICAgIGVsc2UKICAgIHsKICAgICAgICBjb3V0PDwiTm8iPDxlbmRsOwogICAgfQogICAgbnVtPTEyMzIxOwogICAgaWYoSXNQYWxpbmRyb21lKG51bSkgPT0gbnVtKQogICAgewogICAgICAgIGNvdXQ8PCJZZXMiPDxlbmRsOwogICAgfQogICAgZWxzZQogICAgewogICAgICAgIGNvdXQ8PCJObyI8PGVuZGw7CiAgICB9CiAgICBudW09MTIzMjI7CiAgICBpZihJc1BhbGluZHJvbWUobnVtKSA9PSBudW0pCiAgICB7CiAgICAgICAgY291dDw8IlllcyI8PGVuZGw7CiAgICB9CiAgICBlbHNlCiAgICB7CiAgICAgICAgY291dDw8Ik5vIjw8ZW5kbDsKICAgIH0KCiAgICByZXR1cm4gMDsKfQo=