Problem CP: Football 橄榄球

Problem CP: Football 橄榄球

[Creator : ]
Time Limit : 2.000 sec  Memory Limit : 256 MB

SubmitProblemList

Description

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.
皮特耶非常喜欢橄榄球。一天,当他看一场橄榄球赛时,他把球员的位置写在了一张纸上。他将球场情况简化表示为一个由0和1组成的字符串。0指某一球队的队员,1指另一球队的队员。如果某队有至少7名同队球员前后挨着站着,那么这一情况将被视为是危险的。
例如:情况00100110111111101是危险的,而11110111011101不是危险的。
给定当前球场情况,请你确定当前是否是危险的。

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.
第一行:包含一个由0和1组成的非空字符串,字符串长度不超过100字符。两队都至少有1人在场上。

Output

Print "YES" if the situation is dangerous. Otherwise, print "NO".
如果场上情况为危险的,输出"YES",否则输出"NO"

Sample Input Copy

001001

Sample Output Copy

NO

HINT

输入:
1000000001
输出:
YES