#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
using std::max;
using std::min;
using std::priority_queue;
using std::set;
using std::sort;
using std::sqrt;
using std::stack;
using std::string;
using std::swap;
using std::vector;
int main() {
  string s;
  cin >> s;
  int x = 1;
  for (int i = 1; i < s.size(); ++i) {
    if (s[i] == s[i - 1])
      ++x;
    else
      x = 1;
    if (x == 7) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
