Mumba-Yumba
Words in the Mumba-Yumba language are composed exclusively of the letters a, b, and c, and must follow these specific rules:
The letter b cannot appear consecutively.
No word can contain three consecutive identical substrings.
For instance, words like aaa are not allowed because they contain the substring a repeated three times consecutively. Similarly, ababab is not permitted as it includes the substring ab repeated three times consecutively, and aabcabcabca is invalid because it contains the substring abc repeated three times consecutively. Any word that adheres to these rules is considered part of the Mumba-Yumba language.
Write a program to determine if a given word is part of this language.
Input
You will receive a single word consisting only of the lowercase letters a, b, and c, with a maximum length of 100 characters.
Output
Output YES if the word is part of the Mumba-Yumba language; otherwise, output NO.