/* package whatever; // don't place package name! */

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

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static ArrayList<Long> printDivisors(long n) {
        ArrayList<Long> divisors = new ArrayList<>();
 
        for (long i = 1; i <= Math.sqrt(n); i++) {
            if (n % i == 0) {
                if (n / i == i) {
                    divisors.add(i);
                } else {
                    divisors.add(i); 
                    divisors.add(n / i); 
                }
            }
        }
 
        return divisors;
    }
	public static void main (String[] args) throws java.lang.Exception
	{
		long n = 12; 
        ArrayList<Long> divisors = printDivisors(n);
 
     
        Collections.sort(divisors, Collections.reverseOrder());
 
 
        for (long divisor : divisors) {
            System.out.print(divisor + " ");
        }
	}
}