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