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