#K43867. Palindrome Rearrangement

    ID: 27405 Type: Default 1000ms 256MiB

Palindrome Rearrangement

Palindrome Rearrangement

You are given a string s of length n. Your task is to determine whether it is possible to rearrange the characters of s to form a palindrome. A palindrome is a string that reads the same forwards and backwards. In order for a string to be rearranged into a palindrome, the number of characters that appear an odd number of times must be at most one. Mathematically, this condition can be expressed as: $$\text{odd_count} \leq 1$$.

You must read the input from standard input and print the result to standard output. Print 'yes' if the string can be rearranged into a palindrome, otherwise print 'no'.

inputFormat

The input consists of two lines. The first line contains an integer n, which is the length of the string. The second line contains the string s of length n.

outputFormat

Output a single line containing 'yes' if the string s can be rearranged to form a palindrome, or 'no' otherwise.## sample

3
aab
yes