#include <bits/stdc++.h>
using namespace std;
int main() {
  const int size = 100;
  char str[size];
  char str1[] = "1111111";
  char str0[] = "0000000";
  cin.getline(str, size);
  if (strstr(str, str0) || strstr(str, str1)) {
    cout << "YES" << endl;
  } else
    cout << "NO" << endl;
  return 0;
}
