#include<iostream>
#include<string>
#include<algorithm>
#include<cctype>
using namespace std;

bool isPalindrome(string str) {
    string temp = "";
    for (char ch : str) {
        if (isalnum(ch)) {
            temp += tolower(ch);
        }
    }
    
    string rev = temp;
    reverse(rev.begin(), rev.end());
    
    return temp == rev;
}

bool isValidinput(string str) {
    
    if (str[0] == '-')
    return false;
    
    if (str.find('.') != string::npos)
    return false;
    
    for (char ch : str) {
        if (!isalum(ch) && !isspace(ch) && ch != ',')
        return false;
        
    }
    return true;
}
int main() {
    string input;
    getline(cin, input);
    
    if (input.length() > 100 || !isValidInput(input)) {
        cout<<"INVALID INPUT";
        return 0;
    }
    
    if (isPalindrom(input))
    cout<<"YES";
    else
    cout<<"NO";
    return 0;
}