#include<iostream>
#include<string>
#include<cctype>
using namespace std;
int main(){
    string input;
    getline(cin,input);
    
    if(input.length()>100){
        cout<<"INVALID INPUT";
        return 0;
    }
    string cleaned ="";
    
    for(char c:  input ){
        if(c == '-' ||c=='.'){
            cout<<"INVALID INPUT";
            return 0;
        }
        if(isalnum(c)){
            cleaned += tolower(c);
        }
        else if (c==' '){
            continue;
        }
        else{
            cout<<"INVALID INPUT";
            return 0;
        }
    }
    if(cleaned.empty()){
        cout<<"INVALID INPUT";
        return 0;
    }
    int left = 0, right = cleaned.length() - 
    while(left<right){
        if(cleaned[left]!=cleaned[right]){
        cout<<"NO";
        return 0;
    }
    left++;
    right--;
}
cout<<"YES";
return 0;
}