#include <bits/stdc++.h>
int main() {
  char arr[100];
  scanf("%s", &arr);
  int x = strlen(arr);
  for (int i = 0; i < x; i++) {
    if (arr[i] == arr[i + 1] && arr[i] == arr[i + 2] && arr[i] == arr[i + 3] &&
        arr[i] == arr[i + 4] && arr[i] == arr[i + 5] && arr[i] == arr[i + 6]) {
      printf("YES");
      return 0;
    }
  }
  printf("NO");
}
