#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[101];
  cin >> s;
  int k = 1;
  for (int i = 1; s[i] != '\0'; ++i) {
    if (s[i] == s[i - 1])
      k++;
    else
      k = 1;
    if (k == 7) break;
  }
  if (k >= 7)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
