#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int tmp, cnt = 1, flag = 0;
  string str;
  while (cin >> str) {
    cnt = 1;
    flag = 0;
    tmp = str[0];
    for (int i = 1; i < str.length(); i++) {
      if (str[i] == tmp)
        cnt++;
      else {
        if (cnt >= 7) flag = 1;
        tmp = str[i];
        cnt = 1;
      }
    }
    if (flag || cnt >= 7)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
