#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int cur = 1;
  for (int i = 1; i < s.size(); i++) {
    if (s[i] != s[i - 1]) {
      if (cur >= 7) return cout << "YES", 0;
      cur = 1;
    } else
      cur++;
  }
  if (cur >= 7) return cout << "YES", 0;
  cout << "NO";
}
