#K83572. Can Form Palindrome
Can Form Palindrome
Can Form Palindrome
You are given a string s. Your task is to determine whether any permutation of s can form a palindrome.
A string is a palindrome if it reads the same backwards and forwards. Mathematically, a string can be rearranged into a palindrome if at most one character appears an odd number of times. In other words, if we denote the frequency count of characters as \( f(c) \) for each character \( c \), then the condition is:
\[ \text{Number of } c \text{ with } f(c) \mod 2 \neq 0 \leq 1 \]
You need to output "YES" if the string can be rearranged to form a palindrome, and "NO" otherwise.
inputFormat
The input consists of a single line which contains the string s. The string s will consist of only lowercase letters.
outputFormat
Output a single line containing either "YES" if the string can be rearranged to form a palindrome, or "NO" otherwise.
## sampleaabb
YES