#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  size_t satu = s.find("1111111");
  size_t nol = s.find("0000000");
  if (satu != string::npos || nol != string::npos) {
    cout << "YES";
  } else {
    cout << "NO";
  }
}
