#K70412. Palindrome Checker
Palindrome Checker
Palindrome Checker
The task is to determine whether each given string is a palindrome. A palindrome is defined as a string that reads the same backwards as forwards, after removing all non-alphanumeric characters and converting all letters to lowercase. This problem requires you to process multiple input lines, each containing one string.
For example, the string A man, a plan, a canal: Panama
is considered a palindrome, while race a car
is not.
inputFormat
The input consists of multiple lines, where each line contains a string. Input is provided via standard input (stdin).
outputFormat
For each input line, output a single line containing "YES" if the string is a palindrome under the given criteria, and "NO" otherwise. The output should be written to standard output (stdout).## sample
A man, a plan, a canal: Panama
race a car
No lemon, no melon
YES
NO
YES
</p>