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