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