C++
#include
using namespace std;
int main()
{
string str;
cin >> str;
if(str.find("0000000")!=-1 || str.find("1111111")!=-1)
cout << "YES";<br> else
cout << "NO"; <br>}
PascalABC.NET
var
s,a,b:string;
begin
read(s);
a:='1111111';
b:='0000000';
if (pos(a,s)>0) or (pos(b,s)>0) then
writeln('YES')
else writeln('NO');
end.