#include <bits/stdc++.h>
using namespace std;
void match() {
  string a;
  cin >> a;
  int x = a.find("0000000");
  int y = a.find("1111111");
  x = x != -1;
  y = y != -1;
  if (x || y) {
    cout << "YES";
  } else {
    cout << "NO";
  }
}
int main() {
  match();
  return 0;
}
