#include <bits/stdc++.h>
using namespace std;
long long i, n, b, c, d, g, h, j;
long long a[1000];
string s;
int main() {
  cin >> s;
  d = 0;
  c = 0;
  for (i = 0; i < s.size(); i++) {
    if (s[i] == '1') {
      d++;
      c = 0;
    }
    if (s[i] == '0') {
      d = 0;
      c++;
    }
    if (c == 7 || d == 7) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
