#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int c1 = 0, c2 = 0;
  cin >> s;
  for (char c : s) {
    if (c1 >= 7 || c2 >= 7) {
      cout << "YES"
           << "\n";
      return 0;
    }
    if (c == '0') {
      c1++;
      c2 = 0;
    }
    if (c == '1') {
      c2++;
      c1 = 0;
    }
  }
  if (c1 >= 7 || c2 >= 7) {
    cout << "YES"
         << "\n";
  } else {
    cout << "NO"
         << "\n";
  }
  return 0;
}
