#include <bits/stdc++.h>
using namespace std;
char s[1000010];
int a[1000010];
int main() {
  scanf("%s", s + 1);
  int len = strlen(s + 1);
  for (int i = 1; i <= len; i++) a[i] = s[i] == '0' ? 0 : 1;
  int cnt = 1;
  int flag = 0;
  for (int i = 2; i <= len; i++) {
    if (a[i] == a[i - 1])
      cnt++;
    else
      cnt = 1;
    if (cnt >= 7) flag = 1;
  }
  if (flag)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
