#K63297. Palindromic Permutation

    ID: 31722 Type: Default 1000ms 256MiB

Palindromic Permutation

Palindromic Permutation

Given a string s consisting of lowercase letters and spaces, determine whether it is a permutation of a palindrome.

A palindrome is a string that reads the same forwards and backwards. A string is a permutation of a palindrome if the frequency counts of its characters satisfy the condition that at most one character has an odd count. In mathematical terms, for a string with character frequencies \( f(c) \), the string is a permutation of a palindrome if and only if \[ \sum_{c \in \text{alphabet}} \mathbb{1}(f(c) \bmod 2 \neq 0) \leq 1 \] where \(\mathbb{1}(\cdot)\) is the indicator function.

Your task is to read the input string from stdin and print YES if it is a permutation of a palindrome, otherwise print NO.

inputFormat

The input consists of a single line that contains the string s. The string consists of lowercase letters and spaces only. Note that the string may contain leading or trailing spaces, and it may also be empty.

outputFormat

Output YES if the string is a permutation of a palindrome; otherwise, output NO.

## sample
tact coa
YES