#C1442. Palindrome Checker

    ID: 44067 Type: Default 1000ms 256MiB

Palindrome Checker

Palindrome Checker

This problem requires you to determine whether a given string is a palindrome. A palindrome is a sequence of characters which reads the same backward as forward when all non-alphanumeric characters are ignored and case is not considered.

You are given multiple lines of input, each containing a string. The input terminates with a line containing END. For each string (except the terminating END line), output YES if the string is a palindrome and NO otherwise.

Note: When checking for palindromes, remove all characters that are not letters or digits and treat uppercase and lowercase letters as the same.

inputFormat

The input consists of multiple lines. Each line contains a single string. The input terminates when a line with exactly END is encountered. The line containing END should not be processed.

outputFormat

For each input string (except the terminating END), output a single line containing YES if the processed string is a palindrome, or NO otherwise.

## sample
A man, a plan, a canal, Panama
Hello, World!
END
YES

NO

</p>