#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  if (a % b) return gcd(b, a % b);
  return b;
}
template <typename T>
T lcm(T a, T b) {
  return (a * (b / gcd(a, b)));
}
vector<string> tokenizer(string str, char ch) {
  std::istringstream var((str));
  vector<string> v;
  string t;
  while (getline((var), t, (ch))) {
    v.push_back(t);
  }
  return v;
}
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cout << *it << " = " << a << "\n";
  err(++it, args...);
}
void file_i_o() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int main(int argc, char const *argv[]) {
  clock_t begin = clock();
  file_i_o();
  string s;
  cin >> s;
  long long int zero = 0, one = 0;
  for (int i = (0); i <= (s.length() - 1); i++) {
    if (s[i] == '1') {
      if (zero >= 7) {
        break;
      } else {
        zero = 0;
      }
      one++;
    } else {
      if (one >= 7) {
        break;
      } else {
        one = 0;
      }
      zero++;
    }
  }
  if (one >= 7 or zero >= 7) {
    cout << "YES"
         << "\n";
  } else {
    cout << "NO"
         << "\n";
  }
  return 0;
}
