#K59997. Super Palindrome Checker
Super Palindrome Checker
Super Palindrome Checker
In this problem, you are given a word and your task is to determine whether it is a Super Palindrome. A word is called a Super Palindrome if its letters can be rearranged to form a palindrome.
A string can form a palindrome if at most one character has an odd frequency. In mathematical terms, let ( k ) be the number of characters in the word that occur an odd number of times. The word is a Super Palindrome if and only if ( k \le 1 ).
For example, the word aabbcc can form a palindrome because every character appears an even number of times, while abc cannot because all characters appear exactly once.
inputFormat
The input consists of several lines. Each line contains a single word. The input terminates with a line containing the word END which should not be processed.
Each word consists of lowercase English letters only.
outputFormat
For each word (except the terminating END), output a single line containing YES if the word is a Super Palindrome (i.e. it can be rearranged to form a palindrome), or NO otherwise.## sample
aabbcc
racecar
abc
aaaaaa
END
YES
YES
NO
YES
</p>