#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[100];
  cin >> str;
  int l = 0;
  while (str[l] != '\0') l++;
  int m = 0;
  for (int i = 1; i < l; i++) {
    if (str[i] == str[i - 1])
      m++;
    else
      m = 0;
    if (m == 6) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
