407145: GYM102697 116 Diverse String

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

Description

116. Diverse Stringtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

You consider a string to be a diverse string if every pair of adjacent characters are different. For example coderams is a diverse string, while hello is not.

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

Input

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

Output

If the string is a diverse string, output "YES" (no quotes). Otherwise, output "NO" (no quotes).

ExamplesInput
coderamsclub
Output
YES
Input
helloworld
Output
NO

加入题单

算法标签: