#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  bool c = false;
  int size = s.length();
  int curr0 = 0, curr1 = 0;
  for (int i = 0; i < size; i++) {
    if (s[i] == '0') {
      curr0 = curr0 + 1;
      curr1 = 0;
    } else if (s[i] == '1') {
      curr1 = curr1 + 1;
      curr0 = 0;
    }
    if (curr0 >= 7 || curr1 >= 7) {
      cout << "YES";
      c = true;
      break;
    }
  }
  if (!c) {
    cout << "NO";
  }
}
