#include <bits/stdc++.h>
using namespace std;
int main() {
  char string[256];
  cin >> string;
  char a = string[0];
  int res = 1;
  bool key = false;
  for (int i = 1; i <= strlen(string); i++) {
    if (res == 7) {
      key = true;
    }
    int b = string[i];
    if (b == a) {
      res++;
    } else {
      res = 1;
      a = string[i];
    }
  }
  if (key) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
