#include <bits/stdc++.h>
using namespace std;
char a[100];
int main() {
  cin >> a;
  int p = strlen(a);
  int k = 0, l = 0;
  for (int i = 0; i < p; i++) {
    if (a[i] == '1') {
      l = 0;
      k++;
      if (k == 7) break;
    } else if (a[i] == '0') {
      k = 0;
      l++;
      if (l == 7) break;
    }
  }
  if (k == 7 || l == 7)
    printf("YES");
  else
    printf("NO");
  return 0;
}
