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

public class beer_gk {
    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(new File("beer.in"));
        int n = scanner.nextInt();

        int best = Integer.MAX_VALUE;
        int besta = 0;
        int bestb = 0;
        int bestc = 0;

        for (int a = 1; a * a * a <= n; a++) {
            if (n % a != 0) continue;
            for (int b = a; b * b <= n; b++) {
                if (n / a % b != 0) continue;
                int c = n / a / b;
                if (best > a * b + b * c + c * a) {
                    best = a * b + b * c + c * a;
                    besta = a;
                    bestb = b;
                    bestc = c;
                }
            }
        }

        PrintWriter w = new PrintWriter("beer.out");
        w.format("%d %d %d\n", besta, bestb, bestc);
        w.close();
    }
}