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