407209: GYM102697 180 Boring Strings

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

180. Boring Stringstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
This problem is worth 5 points.

You consider a string of text to be boring if it contains only "a" characters and "b" characters. For example, "abbaba" is boring, while "abcccbabc" is not boring.

Given a string, figure out whether or not it is a boring string.

Input

The only line of input contains a single string $$$s$$$, not containing spaces.

Output

If $$$s$$$ is boring, as described above, output "YES" (no quotes). Otherwise, output "NO".

ExamplesInput
aaaaaa
Output
YES
Input
ccabbabbdd
Output
NO
Input
baaaaabad
Output
NO
Input
baaaaabba
Output
YES

加入题单

上一题 下一题 算法标签: