#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int TESTS = 1;
  while (TESTS--) {
    long long int i, j, k, x = 0, y = 0, n, m;
    char a[1000];
    cin >> a;
    n = strlen(a);
    for (i = 1; i < n; i++) {
      if (a[i] == a[i - 1]) {
        x++;
        if (x == 6) {
          cout << "YES";
          return 0;
        }
      } else
        x = 0;
    }
    cout << "NO";
  }
  return 0;
}
