#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *);
int strlen(char *);
main() {
  int i, team0, team1;
  char a[101];
  gets(a);
  for (i = 0; i < strlen(a); i++) {
    if (a[i] == '0') {
      team0++;
      team1 = 0;
    } else {
      team1++;
      team0 = 0;
    }
    if (team0 >= 7 || team1 >= 7) {
      printf("YES");
      return 0;
    }
  }
  printf("NO");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x80(%rbp),%rdi
call   1050 <gets@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x84(%rbp)
lea    -0x80(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x84(%rbp),%eax
cmp    %ecx,%eax
jge    11ea <main+0xba>
movslq -0x8(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%eax
cmp    $0x30,%eax
jne    119b <main+0x6b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
jmp    11ab <main+0x7b>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x7,-0xc(%rbp)
jge    11bf <main+0x8f>
cmpl   $0x7,-0x10(%rbp)
jl     11d7 <main+0xa7>
lea    0xe3a(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11fd <main+0xcd>
jmp    11dc <main+0xac>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1152 <main+0x22>
lea    0xe13(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0xeac(%rip),%r14
test   %eax,%eax
jle    11aa <main+0x7a>
xor    %r13d,%r13d
mov    %rsp,%r12
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r15d
add    $0x1,%ebp
cmpb   $0x30,(%rsp,%rbx,1)
cmovne %r13d,%r15d
cmove  %r13d,%ebp
cmp    $0x6,%r15d
jg     11a3 <main+0x73>
cmp    $0x7,%ebp
jge    11a3 <main+0x73>
add    $0x1,%rbx
mov    %r12,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1170 <main+0x40>
jmp    11aa <main+0x7a>
lea    0xe56(%rip),%r14
mov    %r14,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"YES\00"
@.str.1 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [101 x i8]
store i32 0, i32* %1
%6 = getelementptr inbounds [101 x i8], [101 x i8]* %5, i64 0, i64 0
%7 = call i32 @gets(i8* %6)
store i32 0, i32* %2
br label %8
8: ; preds = %35, %0
%9 = load i32, i32* %2
%10 = getelementptr inbounds [101 x i8], [101 x i8]* %5, i64 0, i64 0
%11 = call i32 @strlen(i8* %10)
%12 = icmp slt i32 %9, %11
br i1 %12, label %13, label %38
13: ; preds = %8
%14 = load i32, i32* %2
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [101 x i8], [101 x i8]* %5, i64 0, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 48
br i1 %19, label %20, label %23
20: ; preds = %13
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
store i32 0, i32* %4
br label %26
23: ; preds = %13
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
store i32 0, i32* %3
br label %26
26: ; preds = %23, %20
%27 = load i32, i32* %3
%28 = icmp sge i32 %27, 7
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = load i32, i32* %4
%31 = icmp sge i32 %30, 7
br i1 %31, label %32, label %34
32: ; preds = %29, %26
%33 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %40
34: ; preds = %29
br label %35
35: ; preds = %34
%36 = load i32, i32* %2
%37 = add nsw i32 %36, 1
store i32 %37, i32* %2
br label %8
38: ; preds = %8
%39 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %40
40: ; preds = %38, %32
%41 = load i32, i32* %1
ret i32 %41
}

LLVM IR (-O2):
@.str = [4 x i8] c"YES\00"
@.str.1 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca [101 x i8]
%2 = getelementptr inbounds [101 x i8], [101 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
%4 = call i32 @strlen(i8* %2)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %10, label %25
6: ; preds = %10
%7 = call i32 @strlen(i8* %2)
%8 = sext i32 %7 to i64
%9 = icmp slt i64 %24, %8
br i1 %9, label %10, label %25
10: ; preds = %0, %6
%11 = phi i64 [ %24, %6 ], [ 0, %0 ]
%12 = phi i32 [ %20, %6 ], [ undef, %0 ]
%13 = phi i32 [ %19, %6 ], [ undef, %0 ]
%14 = getelementptr inbounds [101 x i8], [101 x i8]* %1, i64 0, i64 %11
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 48
%17 = add nsw i32 %13, 1
%18 = add nsw i32 %12, 1
%19 = select i1 %16, i32 %17, i32 0
%20 = select i1 %16, i32 0, i32 %18
%21 = icmp sgt i32 %19, 6
%22 = icmp sgt i32 %20, 6
%23 = select i1 %21, i1 true, i1 %22
%24 = add nuw nsw i64 %11, 1
br i1 %23, label %25, label %6
25: ; preds = %6, %10, %0
%26 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %0 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %10 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %6 ]
%27 = call i32 @printf(i8* dereferenceable(1) %26)
ret i32 0
}