var n,k:integer; begin read(n); k:=2; while k*k<=n do begin while n mod k=0 do begin writeln(k); n:=n div k; end; k:=k+1; end; if n>1 then writeln(n); end.