#include <iostream>
#include <cmath>
using namespace std;
typedef long long LL;
int main()
{
//cout << pow(2, 31) << endl;
LL n, m;
LL cnt, maxc= 0, mini;
while(cin >> n)
{
maxc = 0;
for(int i = 2; i <= sqrt(n); i++)
{
m = n;
cnt = 0, maxc , mini;
for(int j = i; ; j++)
{
//cout << m << endl;
if(m % j != 0)
{
break;
}
if(m % j == 0)
{
cnt++;
m /= j;
}
if(cnt > maxc)
{
maxc = cnt;
mini = i;
}
}
}
if(maxc == 0)
{
//cout << " a" << endl;
cout << 1 << endl << n << endl;
continue;
}
cout << maxc << endl;
for(int i = mini; i < mini + maxc - 1; i++)
{
cout << i << "*";
}
cout << mini + maxc - 1 << endl;
}
return 0;
}