#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, k, n, c, in;
  char s[110];
  cin >> s;
  n = strlen(s);
  k = 0, c = 0, in = s[0];
  for (i = 0; i < n; i++) {
    if (s[i] == in)
      k++;
    else {
      if (k >= 7) {
        c = 1;
        break;
      }
      k = 1;
      in = s[i];
    }
  }
  if (k >= 7) c = 1;
  if (c == 1)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
