#include <bits/stdc++.h>
using namespace std;
char a[110];
int main() {
  scanf("%s", a);
  int len = strlen(a);
  int ans = 1;
  for (int i = 0; i < len; i++) {
    if (a[i] == a[i + 1])
      ans++;
    else
      ans = 1;
    if (ans >= 7) {
      cout << "YES" << endl;
      break;
    }
  }
  if (ans < 7) cout << "NO" << endl;
  return 0;
}
