#include <bits/stdc++.h>
int main() {
  int i, count = 0, h1 = 0, h2 = 0, x = 0;
  char a[101];
  scanf("%s", a);
  for (i = 0; a[i] != '\0'; i++) {
    count++;
    if (a[i] == '0') {
      h1++;
      h2 = 0;
      if (h1 == 7) {
        x = 1;
      }
    } else {
      h1 = 0;
      h2++;
      if (h2 == 7) {
        x = 1;
      }
    }
  }
  if (x == 1) {
    printf("YES");
  } else {
    printf("NO");
  }
}
