#include <bits/stdc++.h>
int main() {
  int a[100], b[100] = {0}, i, j, ctr = 0;
  char temp[100];
  scanf("%s", temp);
  int length = strlen(temp);
  for (i = 0; i < length; i++) {
    a[i] = temp[i] - '0';
  }
  j = 0;
  for (i = 0; i < length; i++) {
    i = j;
    for (j = i; j < length; j++) {
      if (a[i] == a[j])
        ctr++;
      else {
        b[j - 1] = ctr;
        break;
      }
    }
    if (j >= length) {
      b[j - 1] = ctr;
      break;
    }
    ctr = 0;
  }
  for (i = 0; i < length; i++) {
    if (b[i] >= 7) {
      printf("YES");
      return 0;
    }
  }
  printf("NO");
  return 0;
}
