#include <stdio.h>
#include <ctype.h>
#include <string.h>

int main() {
    char s;
    char filtered;
    int n, i, j, len = 0, is_palindrome = 1;

    fgets(s, sizeof(s), stdin);

    // Filter: keep only alphanumerics, convert to lowercase
    for (i = 0; s[i]; ++i) {
        if (isalnum((unsigned char)s[i])) {
            filtered[len++] = tolower((unsigned char)s[i]);
        }
    }
    filtered[len] = '\0';

    // Check palindrome
    for (i = 0, j = len - 1; i < j; ++i, --j) {
        if (filtered[i] != filtered[j]) {
            is_palindrome = 0;
            break;
        }
    }

    if (is_palindrome) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
    return 0;
}