76 atcoder#ABC230B. [ABC230B] Triple Metre

[ABC230B] Triple Metre

Score : 200200 points

Problem Statement

A string SS is said to be a substring of a string TT when there is a pair of integers ii and jj (1ijT)1 \leq i \leq j \leq |T|) that satisfy the following condition.

  • The extraction of the ii-th through jj-th characters of TT without changing the order equals SS.

Let TT be the concatenation of 10510^5 copies of oxx. Given a string SS, print Yes if SS is a substring of TT, and No otherwise.

Constraints

  • SS is a string consisting of o and x.
  • The length of SS is between 11 and 1010 (inclusive).

Input

Input is given from Standard Input in the following format:

SS

Output

If SS satisfies the condition, print Yes; otherwise, print No.

xoxxoxxo
Yes

TT begins like this: oxxoxxoxxoxx... Since the extraction of 33-rd through 1010-th characters of TT equals SS, SS is a substring of TT, so Yes should be printed.

xxoxxoxo
No

Since there is no way to extract from TT a string that equals SS, SS is not a substring of TT, so No should be printed.

ox
Yes