#include <bits/stdc++.h>
using namespace std;
int main() {
  char a, b;
  scanf("%c", &a);
  int i, max;
  i = 1;
  max = 0;
  while (scanf("%c", &b) == 1) {
    if (a == b)
      i++;
    else {
      if (i > max) max = i;
      i = 1;
      a = b;
    }
  }
  if (max >= 7)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
