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


