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