#include <bits/stdc++.h>
using namespace std;
string a, b;
int i, c, d = 0;
int main() {
  cin >> a;
  for (i = 0; i < a.size(); i++) {
    b = a.substr(i, 7);
    if (b == "0000000" || b == "1111111") {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
