#include using namespace std; int main(){ ios::sync_with_stdio(0); cin.tie(0); string s; getline(cin, s); int n = 0, m = 0; bool no = true; for(auto c : s){ if(c == '0'){ n++; m = 0; } else{ m++; n = 0; } if(abs(n - m) > 6){ cout << "YES"; no = false; break; } } if(no){ cout << "NO"; } cout << flush; return 0; }