#C14575. Palindrome Permutation Check

    ID: 44239 Type: Default 1000ms 256MiB

Palindrome Permutation Check

Palindrome Permutation Check

Given a string, determine whether any permutation of its characters can form a palindrome.

A string can be rearranged to form a palindrome if and only if at most one character appears an odd number of times. In other words, if we denote the number of characters with an odd frequency by \(odd\_count\), a palindrome permutation exists if and only if \(odd\_count \le 1\).

For example, the string "racecar" already is a palindrome, and "aabbcc" can be rearranged into one (e.g., "abc cba"). However, "abc" cannot be rearranged into a palindrome.

inputFormat

The input is given via standard input (stdin) and consists of a single line containing the string \(s\). The string can be comprised of letters and other characters.

outputFormat

Print to standard output (stdout) YES if some permutation of the string can form a palindrome, otherwise print NO.

## sample
racecar
YES