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