#C5936. Can Form Palindrome?

    ID: 49640 Type: Default 1000ms 256MiB

Can Form Palindrome?

Can Form Palindrome?

Given a string s, determine if any permutation of the string can form a palindrome.

A palindrome is a string that reads the same forward and backward. A necessary and sufficient condition for some permutation of s to be a palindrome is that no more than one character occurs an odd number of times.

In other words, if we let \( f(c) \) be the frequency of a character \( c \) in s, then a palindrome permutation exists if and only if \( \sum_{c}\mathbb{1}_{\{f(c) \;\text{is odd}\}} \le 1 \).

inputFormat

The input consists of a single line containing a non-empty string s.

The string consists of lowercase English letters.

outputFormat

Output a single line: "YES" if a permutation of s can form a palindrome, otherwise "NO".

## sample
civic
YES