#include <bits/stdc++.h>
using namespace std;
vector<long long int> v;
set<long long int> s1;
set<long long int> s2;
vector<long long int> v1;
vector<long long int> v2;
vector<long long int> v3;
vector<long long int> v4;
vector<long long int> v5;
vector<pair<long long int, long long int> > v6;
vector<string> v7;
list<long long int> l;
int main() {
  int c = 0;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '1') {
      i++;
      c++;
      while (s[i] == '1' && i < s.size()) {
        c++;
        i++;
      }
      if (c >= 7) {
        break;
      } else {
        c = 0;
      }
      i--;
    }
    if (s[i] == '0') {
      i++;
      c++;
      while (s[i] == '0' && i < s.size()) {
        c++;
        i++;
      }
      if (c >= 7) {
        break;
      } else {
        c = 0;
      }
      i--;
    }
  }
  if (c >= 7) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}
