// editor3
#include<iostream>
#include<cctype>
using namespace std;
int main()
{
    string s,t="";
    getline(cin,s);
    if(s[0]=='-'||s.find('.')!=string::nops)
    {
        cout<<"INVALID INPUT";
        return 0;
    }
    for(char c:s)
    if(isalnum(c)) t+=tolower(c);
    string rev=string(t.rbegin(),t.rend());
    cout <<(t==rev ? "YES" : "NO");
}