F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Strange Class

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 1384    Accepted Submission(s): 707


Problem Description
In Vivid¡¯s school, there is a strange class(SC). In SC, the students¡¯ names are very strange. They are in the same format: $a^{n}b^{n}c^{n}$(a,b,c must not be the same with each other). For example studens whose names are¡°abc¡±,¡±ddppqq¡± are in SC, however studens whose names are ¡°aaa¡±,¡°ab¡±,¡±ddppqqq¡± are not in SC.
Vivid makes friends with so many students, he wants to know who are in SC.
 

Input
There are multiple test cases (about 10), each case will give a string S which is the name of Vivid¡¯s friend in a single line.
Please process to the end of file.

[Technical Specification]

$1 \leq |S| \leq 10$.

|S| indicates the length of S.

S only contains lowercase letter.
 

Output
For each case, output YES if Vivid¡¯s friend is the student of SC, otherwise output NO.
 

Sample Input
abc bc
 

Sample Output
YES NO
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-10-12 17:40:21, Gzip enabled