#include <vector>
#include <string>
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int n;
cin >> n;
if (n%4)
{
cout << "prime\n";
return 0;
}
int two = 0;
while(n%2 == 0)
{
two++;
n /= 2;
}
vector<int> ps;
for(int d = 3; n > 1 && d*d <= n; d+=2)
{
while(n%d == 0)
{
ps.push_back(d);
n /= d;
}
}
if (n > 1) ps.push_back(n);
if (ps.size() <= 1)
{
cout << "single\n";
for(int i = 0; i < two-1; ++i) cout << "2 ";
cout << (ps.size()==0 ? 2 : 2*ps[0]) << endl;
}
else
{
cout << "many\n";
for(int i = 0; i < two-2; ++i) cout << "2 ";
cout << 2*ps[0] << " ";
n = 1;
for(int i = 1; i < ps.size(); ++i) n *= ps[i];
cout << 2*n << endl;
for(int i = 0; i < two-1; ++i) cout << "2 ";
cout << 2*n*ps[0] << endl;
}
}
I2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8aW9tYW5pcD4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgoKaW50IG1haW4oKQp7CiAgICBpbnQgbjsKICAgIGNpbiA+PiBuOwogICAgaWYgKG4lNCkKICAgIHsKICAgICAgICBjb3V0IDw8ICJwcmltZVxuIjsKICAgICAgICByZXR1cm4gMDsKICAgIH0KICAgIGludCB0d28gPSAwOwogICAgd2hpbGUobiUyID09IDApCiAgICB7CiAgICAgICAgdHdvKys7CiAgICAgICAgbiAvPSAyOwogICAgfQogICAgdmVjdG9yPGludD4gcHM7CiAgICBmb3IoaW50IGQgPSAzOyBuID4gMSAmJiBkKmQgPD0gbjsgZCs9MikKICAgIHsKICAgICAgICB3aGlsZShuJWQgPT0gMCkKICAgICAgICB7CiAgICAgICAgICAgIHBzLnB1c2hfYmFjayhkKTsKICAgICAgICAgICAgbiAvPSBkOwogICAgICAgIH0KICAgIH0KICAgIGlmIChuID4gMSkgcHMucHVzaF9iYWNrKG4pOwogICAgaWYgKHBzLnNpemUoKSA8PSAxKQogICAgewogICAgICAgIGNvdXQgPDwgInNpbmdsZVxuIjsKICAgICAgICBmb3IoaW50IGkgPSAwOyBpIDwgdHdvLTE7ICsraSkgY291dCA8PCAiMiAiOwogICAgICAgIGNvdXQgPDwgKHBzLnNpemUoKT09MCA/IDIgOiAyKnBzWzBdKSA8PCBlbmRsOwogICAgfQogICAgZWxzZQogICAgewogICAgICAgIGNvdXQgPDwgIm1hbnlcbiI7CiAgICAgICAgZm9yKGludCBpID0gMDsgaSA8IHR3by0yOyArK2kpIGNvdXQgPDwgIjIgIjsKICAgICAgICBjb3V0IDw8IDIqcHNbMF0gPDwgIiAiOwogICAgICAgIG4gPSAxOwogICAgICAgIGZvcihpbnQgaSA9IDE7IGkgPCBwcy5zaXplKCk7ICsraSkgbiAqPSBwc1tpXTsKICAgICAgICBjb3V0IDw8IDIqbiA8PCBlbmRsOwogICAgICAgIGZvcihpbnQgaSA9IDA7IGkgPCB0d28tMTsgKytpKSBjb3V0IDw8ICIyICI7CiAgICAgICAgY291dCA8PCAyKm4qcHNbMF0gPDwgZW5kbDsKICAgIH0KfQoKCg==