"""
52 Football - https://codeforces.com/problemset/problem/96/A
"""
string = input()
if "1111111" in string or "0000000" in string:
    print("YES")
else:
    print("NO")
{'avg_line_length': 22.25, 'max_line_length': 61, 'alphanum_fraction': 0.6292134831460674, 'licenses': ['MIT'], 'repository_name': 'vendyv/A2OJ-11', 'path': 'A2OJ-11/052_A_Football.py', 'size': 178, 'lang': 'Python'}