#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[110];
  scanf("%s", str);
  char* pch;
  pch = strstr(str, "0000000");
  if (pch == NULL) {
    pch = strstr(str, "1111111");
    if (pch == NULL) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
    }
  } else {
    cout << "YES" << endl;
  }
  return 0;
}
