#include <bits/stdc++.h>
using namespace std;
int main() {
  int ma = 0, b[200] = {0};
  string s, s1, s2;
  cin >> s;
  b[0] = 1;
  for (int i = 1; i < s.size(); i++) {
    if (s[i] == s[i - 1])
      b[i] = b[i - 1] + 1;
    else
      b[i] = 1;
  }
  for (int i = 0; i < s.size(); i++)
    if (b[i] > ma) ma = b[i];
  if (ma >= 7)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
