#include <bits/stdc++.h>
using namespace std;
int main() {
  int x = 0;
  char c[100];
  scanf("%s", c);
  for (int i = 1; c[i] != '\0'; i++) {
    if (x > 5) break;
    if (c[i] == c[i - 1])
      x = x + 1;
    else
      x = 0;
  }
  if (x < 6)
    printf("NO\n");
  else
    printf("YES\n");
  return 0;
}
