LearnPy Hub
← Arena
EasyRating 800

Dangerous Position

Players of two teams are written as 0s and 1s in order. The situation is dangerous if at least 7 players of one team stand in a row. Print YES or NO.

Input

A string of 0s and 1s.

Output

YES or NO.

Sample 1

Input
001001
Output
NO

Sample 2

Input
1000000001
Output
YES
solution.py
Output appears here
Dangerous Position · Python Arena problem · LearnPy Hub