// editor2
#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main() {
    char s[1001];
    fgets(s, sizeof(s), stdin);
    
    char clean[1001];
    int k =0;
    for (int i =0; s[i] != '\0'; i++) {
        if (isalpha(s[i]) || isdigit(s[i])) {
            clean[k++] = tolower(s[i]);
        }
    }
    clean[k] = '\0';
    
    int left = 0, right = k - 1;
    while (left < right) {
        if (clean[left] != clean[right]) {
            printf("NO");
            return 0;
        }
        left++;
        right--j;
    }
    
    print("YES");
    return 0;
}