#include <bits/stdc++.h>
#include <cmath>
#include <limits>

using namespace std;
typedef long long LL;
static long long INF = (1LL<<62);

int isPrime(LL p){
	if(p<=1) return 0;
	if(p==2 || p==3 || p==5 || p==7) return 1;
	if(p==4 || p==6 || p==8 || p==9) return 0;

	LL i;
	int ret = 1;
	for(i=2; i*i<=p; i++){
		if(p%i==0 && i!=p){
			ret = 0;
			break;
		}
	}
	return ret;
}

void _factorize(long long N, map<long long, int> &mp){
	if(N == 1){
		return;
	}
	if(isPrime(N)){
		mp[N] += 1;
		return;
	}
 
	long long i = 2, n = N;
	for(i = 2; n != 1 && i < (N/2) + 1; i++){
		if((n % i)==0){
			if(isPrime(i)){
				int e = 0;
				long long u = n;
				while((u % i)==0){
					e++;
					u = u / i;
					n = u;
				}
				mp[i] = e;
				if(isPrime(n)){
					mp[n] = 1;
					break;
				}
			}
		}
	}
	return;
}

vector<LL> A;
void dfs(map<long long, int> mp, vector<int> v){
	if(v.size() == mp.size()){
		LL d = 1;
		int i= 0;
		for(auto itr = mp.begin(); itr != mp.end(); itr++){
			LL p = itr->first;
			int e = v[i];
			for(int j=0; j<e; j++){
				d *= p;
			}
			i++;
		}
		A.push_back(d);
		return;
	}

	int s = v.size();
	int i = 0, e = -1;
	for(auto itr = mp.begin(); itr != mp.end(); itr++){
		if(i == s){
			e = itr->second;
			break;
		}
		i++;
	}
	for(int j=0; j<=e; j++){
		v.push_back(j);
		dfs(mp, v);
		v.pop_back();
	}
	return;
}

int main(int argc, char* argv[]){
	cin.tie(0);
	ios::sync_with_stdio(false);

	LL N; cin >> N;
	map<long long, int> mp;
	_factorize(N, mp);

	vector<int> v;
	dfs(mp, v);
	sort(A.begin(), A.end());
	for(int i=0; i<A.size(); i++){
		printf("%lld\n", A[i]);
	}
	return 0;
}

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

vector<long long> enum_divisors(long long N) {
    vector<long long> res;
    for (long long i = 1; i * i <= N; ++i) {
        if (N % i == 0) {
            res.push_back(i);
            // 重複しないならば i の相方である N/i も push
            if (N/i != i) res.push_back(N/i);
        }
    }
    // 小さい順に並び替える
    sort(res.begin(), res.end());
    return res;
}

int main() {
    long long N;
    cin >> N;
    const auto &res = enum_divisors(N);
    for (int i = 0; i < res.size(); ++i) cout << res[i] << " ";
    cout << endl;
}