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

public class beer_md implements Runnable {
	private Scanner in;
	private PrintWriter out;

	public void run() {
		try {
			solve();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	private void solve() throws IOException {
		Locale.setDefault(Locale.US);
		in = new Scanner(new FileReader("beer.in"));
		out = new PrintWriter("beer.out");
		int n = in.nextInt();
		int min = Integer.MAX_VALUE;
		String ans = "ERROR: No answer found";
		for (int i = 1; i * i * i <= n; i++) {
			for (int j = i; i * j * j <= n; j++) {
				int k = n / (i * j);
				if (i * j * k != n)
					continue;
				int area = i * j + j * k + k * i;
				if (area < min) {
					min = area;
					ans = i + " " + j + " " + k;
				}
			}
		}
		out.println(ans);
		in.close();
		out.close();
	}

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