{ m = 0; print (m++ " " 0); \\ w = number of digits for (w = 1, oo, \\ s = sum of digits for (s = 1, 9*w, if (gcd(s, w)==1, d = vector(w); r = s; d[1]++; r--; forstep (k = w, 1, -1, d[k] += min(r, 9); r -= min(r, 9); ); print (m++ " " fromdigits(d)); ); ); if (m >= 10 000, break; ); ); } quit