#C5391. Palindrome Rearrangement

    ID: 49035 Type: Default 1000ms 256MiB

Palindrome Rearrangement

Palindrome Rearrangement

Given a string consisting of lowercase letters and digits, determine whether its characters can be rearranged to form a palindrome. A string can form a palindrome if at most one character has an odd frequency. This condition can be mathematically expressed as: $$\sum_{c \in S} \mathbf{1}_{{f(c) \bmod 2 \neq 0}} \leq 1$$, where (f(c)) denotes the frequency of character (c) in the string.

inputFormat

The input consists of a single line containing a non-empty string made up of lowercase letters and digits.

outputFormat

Output a single line: 'True' if the characters of the string can be rearranged to form a palindrome, otherwise output 'False'.## sample

aabb
True