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