#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
string str;
bool flag = false;
cin >> str;
int len = str.length();
for(int i = 0; i + 6 < len; ++i) {
int cnt = 0;
for(int j = i; j <= i + 6; ++j) {
if(str[i] == str[j]) {
cnt++;
}
}
if(cnt == 7) {
flag = true;
break;
}
}
if(flag) cout << "YES" << endl;
else cout << "NO" << endl;
return 0;
}