{$O-,Q+,R+}
const MaxN = 1000000;

procedure readr (var x:integer; a, b:integer);
begin
  assert (not seekeoln); read (x); assert ((a<=x) and (x<=b));
end;
procedure readl;
var c:char;
begin
  {$IFNDEF LINUX}
  read (c); assert (c=#13); 
  {$ENDIF}
  read (c); assert (c=#10);
end;

var i, j, k, mi, mj, mk, ma, n, v : integer;

begin
  readr (n, 1, MaxN); readl; assert (eof);
  ma := maxlongint; mi := -1; mj := -1; mk := -1;
  for i := 1 to 1000 do
    for j := i to 1000 do
      if n mod (i * j) = 0 then begin
        k := n div (i * j);
        v := i * j + j * k + k * i;
        if v < ma then begin ma := v; mi := i; mj := j; mk := k end;
      end;
  writeln (mi, ' ', mj, ' ', mk);
end.