#include <bits/stdc++.h>
using namespace std;
int main() {
  string ptrn1 = "0000000";
  string ptrn2 = "1111111";
  string input;
  cin >> input;
  if (input.find(ptrn1) != std::string::npos ||
      input.find(ptrn2) != std::string::npos)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
