using System.Collections.Generic;
public static void Main()
long N = Convert.ToInt64(Console.ReadLine());
long sqrtN = (long)Math.Round(Math.Sqrt(N));
List<long> divs = new List<long>();
for(int i = 1; i <= sqrtN; i++)
Console.Write("{0} ", i);
if(divs[divs.Count - 1] * divs[divs.Count - 1] == N) len--;
for(int i = len - 1; i >= 0; i--)
Console.Write("{0} " ,N / divs[i]);