#include <bits/stdc++.h>   using namespace std;   int main() {     string x;     cin >> x;     int c1 = 0, c0 = 0;     bool f = 0;     for (int i = 0; i < x.size(); i++) {       if (x[i] ==  0 ) {         c0++;       } else if (x[i] ==  1 ) {         c1++;       }       if (c0 < 7 && x[i] ==  1 ) {         c0 = 0;       }       if (c1 < 7 && x[i] ==  0 ) {         c1 = 0;       }     }     if (c1 >= 7 || c0 >= 7) {       cout <<  YES  << endl;     } else {       cout <<  NO  << endl;     }   }   