#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int flag = 0;
  if (s.size() < 7) {
    cout << "NO";
  } else {
    for (int i = 0; i < s.size() - 6; i++) {
      if (s.substr(i, 7) == "1111111" || s.substr(i, 7) == "0000000") {
        cout << "YES";
        flag = 1;
        break;
      }
    }
    if (flag == 0) {
      cout << "NO";
    }
  }
}
