#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string a = "1111111";
  string b = "0000000";
  string c;
  cin >> c;
  if (c.length() >= 7) {
    for (int i = 0; i <= c.length() - 7; i++) {
      string d = "";
      for (int j = i; j < i + 7; j++) {
        d = d + c[j];
      }
      if (d == a || d == b) {
        cout << "YES" << endl;
        return 0;
      }
    }
    cout << "NO" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
