Codeforces Beta Round 77 (Div. 2 Only)
A
Football
Codeforces
900
原题
←B →
翻译中…

Petya loves football very much. One day, as he was watching a football match, he was writing the players' current positions on a piece of paper. To simplify the situation he depicted it as a string consisting of zeroes and ones. A zero corresponds to players of one team; a one corresponds to players of another team. If there are at least $7$ players of some team standing one after another, then the situation is considered dangerous. For example, the situation $00100110111111101$ is dangerous and $11110111011101$ is not. You are given the current situation. Determine whether it is dangerous or not.

翻译中…

Input

翻译中…

The first input line contains a non-empty string consisting of characters "0" and "1", which represents players. The length of the string does not exceed $100$ characters. There's at least one player from each team present on the field.

翻译中…

Output

翻译中…

Print "YES" if the situation is dangerous. Otherwise, print "NO".

翻译中…

样例

Input #1
001001
Output #1
NO
InputCopy OutputCopy
Input #2
1000000001
Output #2
YES
InputCopy OutputCopy
题目信息
题号
96A
时间限制
2 s
内存限制
256 MB
标签
模拟
字符串

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。