#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  int c = 0;
  for (int i = 0; i < str.length(); i++) {
    c = 1;
    while (str[i] == str[i + 1]) {
      c = c + 1;
      if (c == 7) {
        cout << "YES" << endl;
        break;
      }
      i++;
    }
    if (c == 7) {
      break;
    }
  }
  if (c != 7) {
    cout << "NO" << endl;
  }
}
