#include <bits/stdc++.h>
#include <math.h>
using namespace std;
long long tong=0;
int tsnt(long long n)
{
	int k,j,d;
	for (k=2;k<n;k++)
	{
		if (n%k==0)
		{
			cout<<k;
			break;	
			long d=n/k;
			tong=tong+k;	
				
		}
	}
	for (j=2;j<n;j++)
	{
	if (d%j==0)
	{
		cout<<'*'<<j;
		d=d/j;
		tong=tong+j;
	}
	}
	cout<<endl<<tong;
}
int main ()
{
	ifstream f("tsnt.inp");
	ofstream g("tsnt.out");
	long long n;
	f>>n;
	tsnt(n);
}

