#K13871. Palindrome Permutation

    ID: 24009 Type: Default 1000ms 256MiB

Palindrome Permutation

Palindrome Permutation

We are given a string containing only lowercase English letters. Determine whether any permutation of the string can form a palindrome. A palindrome is a string that reads the same forwards and backwards. For a string of length (n), if (n) is even, then each character must appear an even number of times; if (n) is odd, then exactly one character may appear an odd number of times. In mathematical terms, a permutation of the string can form a palindrome if and only if $$\text{odd_count} \le 1$$, where (\text{odd_count}) is the number of characters with an odd frequency.

inputFormat

A single line containing a string of lowercase English letters.

outputFormat

Output a single line containing either "YES" if any permutation of the string can form a palindrome, or "NO" otherwise.## sample

civic
YES