Finding Substring


Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 256M

Problem type
Allowed languages
C++, Python

Substring Detection Problem

Given a 01 string of length n, determine whether it contains a substring consisting of seven consecutive 1s (1111111) or seven consecutive 0s (0000000).

Input Format
One line containing a 01 string.

Output Format
If such a substring exists, output YES; otherwise output NO.

Data Range
All test cases satisfy 1 ≤ n ≤ 100.

Sample Input 1

001001

Sample Output 1

NO

Sample Input 2

1000000001

Sample Output 2

YES

Comments

There are no comments at the moment.