#include<cstdio>
#include<string>
#include<iostream>
#include<stack>
#include<algorithm>
using namespace std;

int main()
{
     string str;
     int ck1,ck2;

    while(cin>>str){
     ck1=0;
     ck2=0;

        for(int i=0;i<str.length();i++){
          //  str[i]=str[i]-48;
          //  cout<<str[i]<<endl;
            if(str[i]=='0'){
                ck1++;
                if(ck1>=7) {break;}
            }
            else if(str[i]=='1'){
                ck1=0;
            }
        } // end loop

            for(int i=0;i<str.length();i++){
            if(str[i]=='1'){
                ck2++;
                if(ck2>=7) {break;}
            }
            else if(str[i]=='0'){
                ck2=0;
            }
        } // end

                if(ck1>=7 ||  ck2 >=7)
                    cout<<"YES"<<endl;
                else
                    cout<<"NO"<<endl;

//            cout<<ck1<<endl;
    }


    return 0;
}
