#include <bits/stdc++.h>
int main() {
  int i, count = 0, danger = 0;
  char soccer[100];
  gets(soccer);
  for (i = 1; i <= strlen(soccer) - 2; i++) {
    if (soccer[i - 1] == soccer[i] && soccer[i] == soccer[i + 1]) {
      count++;
    } else {
      count = 0;
    }
    if (count + 2 >= 7) {
      danger = 1;
    }
  }
  if (danger == 1) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }
  return 0;
}
