Number of
Letters
You
are given a string. Your task is to determine whether number of occurrences of
some characters 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
Sample Input1:
|
Sample Input2:
|
4
acab
zzqzqq
abc
kklkwwww
|
2
ankara
saranda
|
Sample Output1:
|
Sample Output2:
|
YES
YES
NO
YES
|
YES
NO
|
Äëÿ îòïðàâêè ðåøåíèé íåîáõîäèìî