#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int i, count = 0;
  int n;
  cin >> s;
  n = s.length();
  for (i = 0; i < n; i++) {
    if ((s.substr(i, 7) == "1111111") || (s.substr(i, 7) == "0000000")) count++;
  }
  if (count > 0)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
