#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, kiek, ats;
  char p;
  string s;
  cin >> s;
  x = s.size();
  p = s[0];
  kiek = 1;
  ats = 0;
  for (int i = 0; i <= x; i++) {
    if (s[i] == p) {
      kiek++;
    } else {
      kiek = 1;
      p = s[i];
    }
    if (kiek > 6) ats = 1;
  }
  if (ats == 1) {
    cout << "YES";
  } else {
    cout << "NO";
  }
}
