#include <bits/stdc++.h>
using namespace std;
int main() {
  string a = "0000000";
  string b = "1111111";
  string str;
  cin >> str;
  for (int i = 0; i < str.length(); i++) {
    string tmp;
    tmp.assign(str, i, 7);
    if (!a.compare(tmp) || !b.compare(tmp)) {
      cout << "YES";
      break;
    } else if (i == str.length() - 1) {
      cout << "NO";
    }
  }
  return 0;
}
