#include <bits/stdc++.h>
using namespace std;
char a[110];
int main() {
  while (cin >> a) {
    int i, flag = 0;
    int cnt = 1;
    for (i = 1; i < strlen(a); i++) {
      if (a[i] != a[i - 1]) {
        if (cnt >= 7) {
          flag = 1;
        }
        cnt = 1;
      } else {
        cnt++;
      }
    }
    if (flag || cnt >= 7)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
