#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, count = 0, count1 = 0, ans = 0, a = 0, b = 0;
  string ara;
  cin >> ara;
  for (i = 0; i < ara.size(); i++) {
    if (ara[i] == '0')
      a++;
    else if (ara[i] == '1')
      b++;
    if (ara[i] == '1') {
      count++;
      if (count >= 7) ans = 1;
      count1 = 0;
    } else {
      count1++;
      if (count1 >= 7) ans = 1;
      count = 0;
    }
  }
  if (ans == 1 && a >= 1 && b >= 1)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
