#include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
const int sz = 1e4;
int n, m, q[N];
vector<int> v;
bool prime[N] = {};
int main(void) {
  string s;
  cin >> s;
  if (s.size() >= 7) {
    for (int i = 0; i <= s.size() - 7; ++i) {
      string x = s.substr(i, 7);
      if (x == "1111111" || x == "0000000") {
        puts("YES");
        return 0;
      }
    }
    puts("NO");
    return 0;
  }
  if (s.size() < 7) puts("NO");
}
