#include <stdio.h>
int seek(int v) {
int c = 0;
int i;
while (v % 2 == 0) {
v /= 2;
c++;
}
for (i = 3; i <= v; i += 2) {
while (v % i == 0) {
v /= i;
c++;
}
}
return c;
}
void print(int v) {
char sp[] = "";
char op[] = "*";
char *str = sp;
int i;
while (v % 2 == 0) {
v /= 2;
str = op;
}
for (i = 3; i <= v; i += 2) {
while (v % i == 0) {
v /= i;
str = op;
}
}
}
int main(void) {
int f[10001];
int max = 0;
int i;
for (i = 2; i <= 10000; i++) {
f[i] = seek(i);
if (f[i] > max) {
max = f[i];
}
}
for (i = 2; i <= 10000; i++) {
if (f[i] == max) {
print(i);
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgc2VlayhpbnQgdikgewoJaW50IGMgPSAwOwoJaW50IGk7Cgl3aGlsZSAodiAlIDIgPT0gMCkgewoJCXYgLz0gMjsKCQljKys7Cgl9Cglmb3IgKGkgPSAzOyBpIDw9IHY7IGkgKz0gMikgewoJCXdoaWxlICh2ICUgaSA9PSAwKSB7CgkJCXYgLz0gaTsKCQkJYysrOwoJCX0KCX0KCXJldHVybiBjOwp9Cgp2b2lkIHByaW50KGludCB2KSB7CgljaGFyIHNwW10gPSAiIjsKCWNoYXIgb3BbXSA9ICIqIjsKCWNoYXIgKnN0ciA9IHNwOwoJaW50IGk7CglwcmludGYoIiVkID0iLCB2KTsKCXdoaWxlICh2ICUgMiA9PSAwKSB7CgkJdiAvPSAyOwoJCXByaW50ZigiJXMgMiAiLCBzdHIpOwoJCXN0ciA9IG9wOwoJfQoJZm9yIChpID0gMzsgaSA8PSB2OyBpICs9IDIpIHsKCQl3aGlsZSAodiAlIGkgPT0gMCkgewoJCQl2IC89IGk7CgkJCXByaW50ZigiJXMgJWQgIiwgc3RyLCBpKTsKCQkJc3RyID0gb3A7CgkJfQoJfQoJcHV0Y2hhcignXG4nKTsKfQkKCgppbnQgbWFpbih2b2lkKSB7CgkKCWludCBmWzEwMDAxXTsKCWludCBtYXggPS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