#include <bits/stdc++.h>
int main() {
  char player[101];
  int target, numc, i;
  while (scanf("%s", player) == 1) {
    for (i = numc = 0, target = player[0]; player[i] != 0; i++) {
      if (player[i] == target)
        numc++;
      else {
        target = player[i];
        numc = 1;
      }
      if (numc == 7) break;
    }
    if (numc == 7)
      printf("YES\n");
    else
      printf("NO\n");
  }
}
