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.
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.
none
001001
NO
1000000001
YES
00100110111111101
YES
11110111111111111
YES
01
NO
10100101
NO
1010010100000000010
YES
101010101
NO
000000000100000000000110101100000
YES
100001000000110101100000
NO
100001000011010110000
NO
010
NO
10101011111111111111111111111100
YES
1001101100
NO
1001101010
NO
1111100111
NO
00110110001110001111
NO
11110001001111110001
NO
10001111001011111101
NO
10000010100000001000110001010100001001001010011
YES
01111011111010111100101100001011001010111110000010
NO
00100000100100101110011001011011101110110110010100
NO
10110100110001001011110101110010100010000000000100101010111110111110100011
YES
00011101010101111001011011001101101011111101000010100000111000011100101011
NO
01110000110100110101110100111000101101011101011110110100100111100001110111
NO
11110110011000100111100111101101011111110100010101011011111101110110110111
YES
100100010101110010001011001110100011100010011110100101100011010001001010001001101111001100
NO
111110010001011010010011111100110110001111000010100011011100111101111101110010101111011110000001010
NO
111110111100010100000100001010111011101011000111011011011010110010100010000101011111000011010011110
NO
1011110110111010110111111010010010100011111011110000011000110010011110111010110100011010100010111000
NO
0010100111100010110110000011100111110100111110001010000100111111111010111100101101010101001011010110
YES
1111010100010100101011101100101101110011000010100010000001111100010011100101010001101111000001011000
NO
0101100011001110001110100111100011010101011000000000110110010010111100101111010111100011101100100101
YES
0001101110011101110000000010011111101001101111100001001010110000110001100000010001111011011110001101
YES
1000010000100000100010000100001000010000100001000010000100001000010000100001000010000100001000010000
NO
1000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000
YES
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
YES
1111111111111111111111111111111111111111011111111111111111111111111111111111111111111111111111111111
YES
10100101000
NO
11110111011101
NO
10000000
YES
00000001
YES
01111111
YES
11111110
YES
x = input()
if len(x) < 7:
    print("NO")
else:
    k = x.find("0000000")
    r = x.find("1111111")
    if k == -1 and r == -1:
        print("NO")
    else:
        print("YES")