#include <bits/stdc++.h>
int main() {
  int team1, team2;
  std::string s;
  std::cin >> s;
  team1 = s.find("1111111");
  team2 = s.find("0000000");
  if (team1 >= 0 || team2 >= 0) {
    std::cout << "YES";
  } else
    std::cout << "NO";
}
