#include <bits/stdc++.h>
using namespace std;
int main() {
  string play;
  getline(cin, play);
  int c = 0;
  string d1 = "0000000";
  string d2 = "1111111";
  if (play.find(d2) != std::string::npos) c++;
  if (play.find(d1) != std::string::npos) c++;
  if (c >= 1)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
