HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > Epoka Science Olympiad 2016 > problem:


11-2. 50968 - Number of Letters

Epoka Science Olympiad 2016

Start: Apr.11.2016 at 02:07:57 PM
Finish: Apr.24.2016 at 05:00:00 AM
The contest is finished!
• Contest scoreboard

Contest problems

• 10-4. 50965 - Draw the Pattern
• 10-5. 50966 - TVSH
• 10-P1. 50901 - Sum of Cubes-1
• 10-P2. 50902 - Translate Score into...
• 10-P3. 50903 - Basic Math Calculator
• 10-P4. 50904 - Print All Prime Numbers
• 10-P5. 50905 - Convert KPH to MPH
• 11-1. 50967 - Finding Square Roots
• 11-2. 50968 - Number of Letters
• 11-3. 50969 - Chef and Feedback
• 11-4. 50970 - Marbles
• 11-5. 50971 - Belote Game
• 11-P1. 50906 - The Smallest Pair
• 11-P2. 50907 - Second Largest
• 11-P3. 50908 - Buy 1 Get 1
• 11-P4. 50909 - Gold Coins
• 11-P5. 50910 - Flipping Coins

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.

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

 

Äëÿ îòïðàâêè ðåøåíèé íåîáõîäèìî âûïîëíèòü âõîä.

www.contester.ru