#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <set>
bool isNumberContainIdenticalDigits(const std::string& str) {
std::set<char> set(str.begin(), str.end());
return set.size() == 1;
}
int main() {
int n = 999999;
std::ostringstream oss;
oss << n;
std::string s = oss.str();
if (isNumberContainIdenticalDigits(s)) {
std::cout << "yes" << std::endl;
} else {
std::cout << "no" << std::endl;
}
}
/*
run:
yes
*/