#include <bits/stdc++.h>
using namespace std;
int subString(string s, string target) {
  if (s.size() < target.size()) {
    return -1;
  }
  for (int i = 0, j; i < s.size(); ++i) {
    for (j = 0; j < target.size() && s[i] == target[j];) {
      j++;
      i++;
    }
    if (j == target.size()) {
      return (i - target.size() + 1);
    }
  }
  return -1;
}
int main() {
  string line;
  cin >> line;
  if (subString(line, "0000000") > 0 || subString(line, "1111111") > 0)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
