#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 100;
int x;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  x++;
  for (int i = 1; i < s.size(); i++) {
    if (s[i] == s[i - 1])
      x++;
    else
      x = 1;
    if (x == 7) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
