#include<iostream>
#include<string>
#include<cctype>
#include<algorithm>
using namespace std;
int main(){
    string s,t="";
    getline (cin,s);
    
    if(s.find('-')!=string::npos||s.find('-')!=string::npos){
        cout<<"INVALID INPUT";
        return 0;
    }
    for(char c : s)
         if(isalnum(c))t=tolower(c);
    if(t.empty()){
        cout<<"INVALID INPUT";
        return 0;
    }
    string r=t;p
    reverse(r.begin(),r.endl());
    cout<<(t==r?"YES":"NO");
}