#include <bits/stdc++.h>
int main() {
  int i, count = 0;
  char m[102];
  scanf("%s", m);
  for (i = 0; i < strlen(m); i++) {
    if (m[i] == '0') {
      count++;
      if (count == 7) {
        break;
      } else if (m[i + 1] == '1') {
        count = 0;
      } else if (m[i + 1] == '0') {
        continue;
      }
    } else if (m[i] == '1') {
      count++;
      if (count == 7) {
        break;
      } else if (m[i + 1] == '0') {
        count = 0;
      } else if (m[i + 1] == '1') {
        continue;
      }
    }
  }
  if (count == 7) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }
  return 0;
}
