P13801 [CodeChef] lch15jab
入门
题目描述

This is a very easy warm-up problem.
You are given a string. Your task is to determine whether number of occurrences of some character in the string is equal to the sum of the numbers of occurrences of other characters in the string. 

Input
The first line of the input contains an integer T denoting the number of test cases. Each of the next T lines contains one string S consisting of lowercase latin letters.

Output
For each test case, output a single line containing "YES" if the string satisfies the condition given above or "NO" otherwise.

Constraints
1 ≤ T ≤ 1000
1 ≤ length of S ≤ 50

Example
Input:
4
acab
zzqzqq
abc
kklkwwww
Output:
YES
YES
NO
YES

输入格式

见题面

输出格式

见题面

样例输入
4 acab zzqzqq abc kklkwwww
样例输出
YES YES NO YES