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