#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;
}
