#include <bits/stdc++.h>
using namespace std;
long a,b=0,c=2,d[1000000],tong=0;
bool snt (long a)
{
	for (long i=2; i<=sqrt(a); i++)
	if (a%i==0) return false;
	return true;
}
int main ()
{
	freopen ("TSNT.inp", "r", stdin);
	freopen ("TSNT.out", "w", stdout);
	cin>>a;
	while (a!=1)
	{
		if (a%c==0)
		{
			a=a/c;
			b++;
			d[b]=c;	
			tong+=c;
		}
		else c++;
		if (snt(a)==true) {b++;d[b]=a;
		break;}
	}
	for (int y=1; y<b; y++)
	cout<< d[y] << "*";
	cout<< d[b] << endl << tong;
	
}

