#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  char c = s[0];
  int co = 1;
  for (int i = 1; i < s.length(); i++) {
    if (s[i] == c)
      co++;
    else {
      c = s[i];
      co = 1;
    }
    if (co == 7) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
}
