#K75437. Can Form Palindrome
Can Form Palindrome
Can Form Palindrome
Given a string s, determine whether any permutation of s can form a palindrome. A string is a palindrome if it reads the same forwards and backwards. A necessary and sufficient condition for rearranging the string into a palindrome is that at most one character appears an odd number of times. In mathematical terms, if the frequency of each character is \(n_i\), then the string can be rearranged into a palindrome if and only if
\(\sum_{i}[n_i \bmod 2 \neq 0] \le 1\)
Output Yes if it is possible to rearrange s into a palindrome; otherwise, output No.
inputFormat
The input consists of a single line containing the string s. The string is non-empty and contains only alphabetical characters.
outputFormat
Output a single line with either Yes or No indicating whether any permutation of s can form a palindrome.
## samplecivic
Yes
</p>