#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.size(), cnt = 0;
  s += '2';
  for (int i = 0; i < n; i++) {
    cnt++;
    if (s[i] != s[i + 1]) {
      if (cnt >= 7) {
        cout << "YES";
        return 0;
      }
      cnt = 0;
      continue;
    }
  }
  cout << "NO";
}
