#include <bits/stdc++.h>
using namespace std;
const int N = 1000005;
int arr[N];
int main() {
  ios_base::sync_with_stdio(true);
  char n[105], warn = 0, sum = 0, t;
  fgets(n, 105, stdin);
  t = n[0];
  sum++;
  for (int i = 1; n[i]; ++i) {
    if (n[i] == n[i - 1])
      sum++;
    else
      sum = 1;
    if (sum >= 7) warn = 1;
  }
  cout << (warn ? "YES" : "NO");
  return 0;
}
