import java.util.*;
import java.io.*;

public class beer_as implements Runnable {
    public void solve() throws IOException {
        Scanner in = new Scanner(new File("beer.in"));
        PrintWriter out = new PrintWriter("beer.out");

        int n = in.nextInt();

        int best = Integer.MAX_VALUE;
        int ba = 0, bb = 0, bc = 0;
        for (int a = 1; a * a <= n; a++) {
            for (int b = 1; a * b * b <= n; b++) {
                if (n % (a * b) == 0) {
                    int c = n / (a * b);
                    if (a * b + b * c + c * a < best) {
                        best = a * b + b * c + c * a;
                        ba = a;
                        bb = b;
                        bc = c;
                    }
                }
            }
        }

        out.println(ba + " " + bb + " " + bc);

        in.close();
        out.close();
    }

    public void run() {
        try {
            solve();
        } catch (IOException e) {
        }
    }

    public static void main(String[] arg) {
        new Thread(new beer_as()).start();
    }
}