#include <bits/stdc++.h>
using namespace std;
void solve() {
  string s;
  cin >> s;
  long long win_sum = 0;
  for (long long i = 0; i < min((int)s.length(), 7); i++) {
    win_sum += s[i] - 48;
  }
  for (long long i = 7; i < s.length(); i++) {
    if ((win_sum == 7) or (win_sum == 0)) {
      cout << "YES";
      return;
    }
    win_sum -= s[i - 7] - 48;
    win_sum += s[i] - 48;
  }
  if ((win_sum == 7) or (win_sum == 0)) {
    cout << "YES";
    return;
  }
  cout << "NO";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
