#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int streak = 0;
  int maxStreak = 0;
  char c = '2';
  for (int i = 0; i < s.length(); i++) {
    if (c != s[i]) {
      c = s[i];
      streak = 0;
    }
    streak++;
    maxStreak = streak > maxStreak ? streak : maxStreak;
  }
  cout << (maxStreak >= 7 ? "YES" : "NO") << endl;
  return 0;
}
