#include "bits/stdc++.h"
using namespace std;
mt19937 rng(123);
int main() {
unordered_map<int, int> m;
vector<int> v;
for (int i = 0; i < 1234567; ++i) {
m[rng() % (int)1e9]++;
int c = m.bucket_count();
if (v.empty() || c != v.back()) {
v.push_back(c);
cout << m.size() << ' ' << c << endl;
}
}
return 0;
}
I2luY2x1ZGUgImJpdHMvc3RkYysrLmgiCgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKbXQxOTkzNyBybmcoMTIzKTsKCmludCBtYWluKCkgewogICAgdW5vcmRlcmVkX21hcDxpbnQsIGludD4gbTsKICAgIHZlY3RvcjxpbnQ+IHY7CiAgICBmb3IgKGludCBpID0gMDsgaSA8IDEyMzQ1Njc7ICsraSkgewogICAgICAgIG1bcm5nKCkgJSAoaW50KTFlOV0rKzsKICAgICAgICBpbnQgYyA9IG0uYnVja2V0X2NvdW50KCk7CiAgICAgICAgaWYgKHYuZW1wdHkoKSB8fCBjICE9IHYuYmFjaygpKSB7CiAgICAgICAgICAgIHYucHVzaF9iYWNrKGMpOwogICAgICAgICAgICBjb3V0IDw8IG0uc2l6ZSgpIDw8ICcgJyA8PCBjIDw8IGVuZGw7CiAgICAgICAgfQogICAgfQoKICAgIHJldHVybiAwOwp9Cg==