#include <bits/stdc++.h>
using namespace std;
int p[1000000];
bool vis[100000 + 10];
int main() {
  bool f = 0;
  string s;
  int ct = 0;
  cin >> s;
  char curp = '0';
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == curp)
      ct++;
    else
      ct = 1;
    curp = s[i];
    if (ct == 7) f = 1;
  }
  if (f) cout << "YES" << endl;
  if (!f) cout << "NO" << endl;
  return 0;
}
