#abc230b. [abc230_b]Triple Metre
[abc230_b]Triple Metre
Problem Statement
A string is said to be a substring of a string when there is a pair of integers and ( that satisfy the following condition.
- The extraction of the -th through -th characters of without changing the order equals .
Let be the concatenation of copies of oxx
.
Given a string , print Yes
if is a substring of , and No
otherwise.
Constraints
- is a string consisting of
o
andx
. - The length of is between and (inclusive).
Input
Input is given from Standard Input in the following format:
Output
If satisfies the condition, print Yes
; otherwise, print No
.
Sample Input 1
xoxxoxxo
Sample Output 1
Yes
begins like this: oxxoxxoxxoxx
... Since the extraction of -rd through -th characters of equals , is a substring of , so Yes
should be printed.
Sample Input 2
xxoxxoxo
Sample Output 2
No
Since there is no way to extract from a string that equals , is not a substring of , so No
should be printed.
Sample Input 3
ox
Sample Output 3
Yes