#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  char arr[1000];
  cin >> arr;
  int flag = 1, curr = 0;
  for (int i = 0; i < strlen(arr); i++) {
    if (i == 0)
      curr = 1;
    else if (flag == 1) {
      if (arr[i] == arr[i - 1]) {
        curr++;
        if (curr >= 7) {
          flag = 0;
          cout << "YES";
          return 0;
        }
      } else {
        curr = 1;
      }
    }
  }
  cout << "NO";
  return 0;
}
