#K42142. Can Form Palindrome?
Can Form Palindrome?
Can Form Palindrome?
Given a string S, determine whether any permutation of the characters in S can form a palindrome. A palindrome is a string that reads the same forward and backward. For a string to be rearranged into a palindrome, it is necessary that at most one character appears an odd number of times. In mathematical terms, if the frequency of each character is denoted as \(f_i\), then the following condition must be satisfied:
\(\sum_{i}(f_i \bmod 2) \leq 1\)
Output YES if such an arrangement is possible; otherwise, output NO.
inputFormat
The input consists of a single line containing the string S. The string will consist of only ASCII characters.
outputFormat
Print a single line containing YES if a permutation of S can form a palindrome, and NO otherwise.
## sampleaabb
YES