import java.util.Scanner;

public class Section021 {
	public static void main(String[] args) {
		Scanner scanf = new Scanner(System.in);
		int b, c, d, e, mok = 0, nmg;
		int a[] = new int[100];
		b = scanf.nextInt();
		c = -1;
		d = 2;
		while (true)
		{
			e = (int)Math.sqrt(b);
			while (true)
			{
				if (d > e)
				{
					d = b;
					break;
				}
				mok = b / d;
				nmg = b - mok*d;
				if (nmg == 0)
					break;
				else
					d++;
			}
			c++;
			a[c] = d;
			if (b == d)
				break;
			b = mok;
		}
		for (int i = 0; i <= c; i++)
			System.out.printf("%d ", a[i]);
		scanf.close();
	}
}