#include <bits/stdc++.h>
using namespace std;
int main() {
  string situation;
  cin >> situation;
  int Counter0 = 0, Counter1 = 0;
  for (int i = 0; i < situation.length(); i++) {
    if (situation[i] == '0') {
      Counter0++;
      if (Counter0 == 7) {
        cout << "YES" << endl;
        return 0;
      }
      Counter1 = 0;
    } else if (situation[i] == '1') {
      Counter1++;
      if (Counter1 == 7) {
        cout << "YES" << endl;
        return 0;
      }
      Counter0 = 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
