#C8810. Invertible Strings

    ID: 52834 Type: Default 1000ms 256MiB

Invertible Strings

Invertible Strings

You are given T strings. A string \( s \) of length \( n=|s| \) is said to be invertible if and only if \( n \) is even and its first half is equal to the reversal of its second half. In other words, if we let \( \frac{n}{2} \) be the midpoint, then \( s[0: \frac{n}{2}] \) must be equal to \( \text{reverse}(s[\frac{n}{2}: n]) \).

Your task is to determine whether each string is invertible. If it is, print YES; otherwise, print NO.

inputFormat

The first line of input contains an integer T (1 \( \leq T \leq 1000 \)) representing the number of test cases. Each of the following T lines contains a non-empty string consisting of lowercase letters.

outputFormat

For each test case, output a single line containing either YES if the string is invertible, or NO otherwise.

## sample
3
abba
aabb
abcba
YES

NO NO

</p>