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