#C8464. Can Form Palindrome

    ID: 52449 Type: Default 1000ms 256MiB

Can Form Palindrome

Can Form Palindrome

Given a string s that may contain letters, digits, spaces, and punctuation, determine whether its characters can be rearranged to form a palindrome.

A palindrome is a string that reads the same forwards and backwards. In order for a string to be rearranged into a palindrome, at most one character can have an odd count. All other characters must occur an even number of times.

Note: The input string should be processed in a case-insensitive manner and all non-alphanumeric characters must be ignored. The underlying logic can be described using the following inequality in LaTeX:

\( \text{if } \sum_{c\in S} \mathbb{1}\{\text{count}(c)\%2 \neq 0\} \leq 1 \text{ then YES, otherwise NO} \)

inputFormat

The input consists of a single line containing the string s.

The string may contain letters, digits, spaces, and punctuation.

outputFormat

Output a single line: "YES" if the characters of the string can be rearranged to form a palindrome, otherwise output "NO".

## sample
Taco cat
YES