#include<iostream>
#include<string>
#include<algorithm>
#include<cctype>
using namespace std;
bool isValidInput(string s){
    if(s.empty()) return false;
    bool hasDecimal = false;
    for(int i=0;i<s.length();i++){
        if (s[i] =='.') hasDecimal = true;
    }
    if(s[0] =='-' && s.length() > 1 && isdigit(s[1])) return false;
    if(hasDecimal) return false;
    return true;
    
}
int main(){
    string input;
    getline(cin,input);
    if(!isValidInput(input)){
        cout<<"INVALID INPUT"<<endl;
        return 0;
    }
    string cleaned = "";
    for(char c : input){
        if(isalnum(c)){
            cleaned += tolower(c);
        }
    }
     string reversadStr = cleaned;
     reverse(reversadStr.begin(), reversadStr.end());
     if(cleaned == reversedStr){
         cout<<"YES"<<endl;
     }else{
         cout<<"NO"<<endl;
     }
     return 0;
}