#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using ld = long double;
using Graph = vector<vector<int>>;

int main(void)
{
    ll n,tmp;
    cin >> n;
    vector<ll> v;

    for(long i=1;i<=sqrt(n);++i)
    {
        if(n%i==0)
        {
            cout << i << endl;
            if(i!=n/i)
            {
                v.push_back(n/i);
            }
        }
    }
    if(v.size()==0)
    {
        return 0;
    }
    for(long i=0;i<=v.size();++i)
    {
        tmp=v[v.size()-i];
        if(tmp!=0)
        {
            cout << v[v.size()-i] << endl;
        }
    }

    return 0;
}

#include<bits/stdc++.h>

using namespace std;
#define PI              3.1415926536

#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod 1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define REP(i,n) for(i=0;i<n;i++)
#define FIO             ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());

void c_p_c()
{
#ifndef  ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}
int n, m, k;
char graph[501][501];

int vis[501][501];
int times;
int dx[] = { -1, 0, 1, 0};
int dy[] = {0, 1, 0, -1};

bool isValid(int x, int y)
{
	return x < n && y < m && x >= 0 && y >= 0 && graph[x][y] == 'X';
}


void dfs(int i, int j)
{


	if (times == 0)
	{
		for (int i = 0; i < n; i++)
			printf("%s\n", graph[i]);
		exit(0);
	}

	graph[i][j] = '.';
	times--;



	for (int p = 0; p < 4; p++)
	{
		int g = i + dx[p];
		int h = j + dy[p];

		if (isValid(g, h))
		{
			dfs(g, h);
		}
	}


}

int32_t main() {




	//c_p_c();
	FIO;





	int n;
	cin >> n;

	int i;
	set<int>se;

	for (i = 1; i * i <= n; i++)
	{
		if (n % i == 0)
		{
			se.insert(i);
			se.insert(n / i);
		}

	}

	for (auto &it : se)
		cout << it << endl;











}
