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