#include <bits/stdc++.h>
int main() {
  char s[101];
  int a = 0, b = 0;
  scanf("%s", s);
  for (int i = 0; i < strlen(s); ++i) {
    if ((s[i] == '0')) {
      a++;
      b = 0;
      if (a == 7) {
        break;
      }
    } else {
      b++;
      a = 0;
      if (b == 7) {
        break;
      }
    }
  }
  if ((a == 7) || (b == 7)) {
    printf("%s", "YES");
  } else {
    printf("%s", "NO");
  }
  return 0;
}
