By Kay Akashi
Human body has pairs of ribs. Rib cage forms the chest cavity, and protects important organs inside.
Because of fragility, ribs are prone to fracture by trauma. Flail chest is a medical term that describes the specific rib fracture pattern, and is defined as follows: the rib fractures where or more adjacent ribs are broken.
You will receive a string of length each letter of which is either "o" (intact) or "x" (fractured) that you collected from your patient. -th letter states the status of -th rib . Your task is to judge whether their fracture pattern is categorised as flail chest or not.
Each letter in is either "o" or "x".
The input consists of a single string, .
If signifies flail chest, output "Yes" (case-specific). Otherwise, output "No".
oxxxoooooooo
Yes
The nd, rd, and th ribs are broken. Because there're consecutive affected ribs, it's categorised as flail chest.
oxxoxxoxxoxx
No
Despite the tragedy, no adjacent ribs underwent fracture. This is not flail chest.
oooooooooooo
No
Why the heck did this patient come to see a doctor?
xxxxoxxoxxxx
Yes
Note that there may be several triplets of broken ribs.