#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  int countZ = 0;
  int countO = 0;
  bool rr = false;
  for (int i = 0; i < str.length(); i++) {
    if (str[i] == '1') {
      countO++;
      if (countO >= 7) {
        rr = true;
        break;
      }
      countZ = 0;
    } else {
      if (str[i] == '0') {
        countZ++;
        if (countZ >= 7) {
          rr = true;
          break;
        }
        countO = 0;
      }
    }
  }
  if (rr) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
