#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int c = 0;
  int f = 1;
  int cvf = 1;
  for (int i = 0; i < s.length() - 1; i++) {
    if (cvf) {
      c = 0;
    }
    if (s[i] == s[i + 1]) {
      if (i != s.length() - 2) {
        c = c + 1;
      } else {
        c = c + 2;
      }
      if (c >= 7) {
        cout << "YES\n";
        f = 0;
        break;
      }
      cvf = 0;
    } else {
      c = c + 1;
      if (c >= 7) {
        cout << "YES\n";
        f = 0;
        break;
      }
      cvf = 1;
    }
  }
  if (f) {
    cout << "NO\n";
  }
  return 0;
}
