#include <bits/stdc++.h>
int main() {
  char s[101];
  scanf("%s", s);
  int i, j, a = 0;
  int l = strlen(s);
  for (i = 0; i < l; i++) {
    int count = 0;
    for (j = 0; j < l; j++) {
      if (s[i] == s[j]) {
        count++;
        if (count > 6) {
          a = 1;
        }
      } else {
        count = 0;
      }
    }
  }
  if (a == 1) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }
}
