#include <bits/stdc++.h>
int main() {
  char s[100];
  gets(s);
  int i, j, k, count0 = 1, count1 = 1;
  for (i = 0; s[i] != '\0'; i++) {
    if (s[i] == '0') {
      for (j = i + 1; s[j] != '\0'; j++) {
        if (s[j] == '0')
          count0++;
        else
          break;
      }
      if (count0 >= 7) {
        printf("YES\n");
        return 0;
      }
      count0 = 1;
    }
    if (s[i] == '1') {
      for (j = i + 1; s[j] != '\0'; j++) {
        if (s[j] == '1')
          count1++;
        else
          break;
      }
      if (count1 >= 7) {
        printf("YES\n");
        return 0;
      }
      count1 = 1;
    }
  }
  printf("NO\n");
  return 0;
}
