var m:integer;function ph(n2,i2:integer):boolean;begin ph:=false; if n2 mod i2=0 then ph:=true else if i>2 then ph:=ph(n2,i2-1);end;procedrue sj(n,s:integer);var i:integer;begin i:=0; while n mod s=0 do begin i:=i+1; n:=n div s; end; if i<>0 then write(s,'(',i,')'); if n<>1 then begin if i<>0 then write('*'); sj(n,s+1); end;end;begin readln(m); if ph(m,trunc(sqrt(m))) then begin write(m,'='); sj(m,2); end else writeln('Wrong'); readln;end.{如果是素数就会输出'Wrong'了,如果不是会输出类似120=2(3)*3(1)*5(1)的}
var
a:array[2..997] of longint;
i,j,k,l,m,n:longint;
begin
readln(k);
j:=2;m:=k;
repeat
if m mod j=0 then begin inc(a[j]);m:=m div j; end
else inc(j);
until m=1;
write(k,'='); i:=2; while a[i]=0 do inc(i); write(i);dec(a[i]);
for i:=2 to n do if a[i]<>0 then begin
if i<>2 then for j:=1 to a[i] do write('*',i)
else for j:=2 to a[2] do write('*',i); end;
end.