#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int colvo = 0;
  for (int i = 1; i < s.size(); i++) {
    if (s[i] == s[i - 1]) {
      colvo++;
    }
    if (colvo >= 6) {
      cout << "YES";
      return 0;
    }
    if (s[i] != s[i - 1]) {
      colvo = 0;
    }
  }
  cout << "NO";
  return 0;
}
