#include <fstream>
#include <string>

using namespace std;

int main()
{
    ifstream fi("tsnt.inp");
    ofstream fo("tsnt.out");
    int n,tg,t = 0;
    fi >> n;
    tg = n;
    fo << n << "=";
    for (int i = 2; i*i <= tg; i++)
        while (n%i == 0 && i <= n)
       {
         if (n != i) fo << i << "*";
         else fo << i << endl;
         n /= i;
         t += i;
       }
    if (tg != n) fo << t;
    else
    {
        fo << tg << endl << tg;
    }
    return 0;
}

