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