#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int x, i, j, a, f, n, lt, sm, ct;
  string st;
  cin >> st;
  lt = st.size();
  char prv = st[0];
  ct = 1;
  f = 0;
  for (i = 1; i < lt; i++) {
    if (st[i] == prv)
      ct++;
    else {
      ct = 1;
      prv = st[i];
    }
    if (ct >= 7) {
      f = 1;
      break;
    }
  }
  if (f == 1)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
