#include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>
#define rep(i,n) for(ll i = 0; i < (n); i++)
using ll = long long;
using namespace std;

int main(){
    ll n, j = 0;
    cin >> n;
    vector<ll>a;
    ll b = (ll)sqrt(n);
    if(n == 1){
        cout << 1 << endl;
        return 0;
    }else if(n == 2){
        cout << 1 << endl << 2 << endl;
        return 0;
    }else if(n == 3){
        cout << 1 << endl << 3 << endl;
        return 0;
    }else if(n == 4){
        cout << 1 << endl << 2 << endl << 4 << endl;
        return 0;
    }
    rep(i,b){
        if(n % (i+1) == 0){
            a.push_back(i+1);
            if((i+1) * (i+1) != n) a.push_back(n / (i+1));
        }
    }
    sort(a.begin(), a.end());
    rep(i,a.size()) cout << a[i] << endl;
    return 0;
}
#include <iostream>
#include <vector>
#include <climits>
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
#include <string>
#include <bitset>
#include <utility>
#include <numeric>
#include <queue>
#include <stack>
#include <functional>
#include <iomanip>

using ll = long long;
using namespace std;

constexpr int MOD = 1e9 + 7;
constexpr ll MOD_LL = ll(1e9 + 7);

template<typename T>
vector<T> Divisors(T n) {
	vector<T> ret;
	for(T i = 1; i * i <= n; ++i) {
		if( n % i == 0 ) {
			ret.push_back(i);
			
			if( i < n / i ) ret.push_back(n / i);
		}
	}
	
	sort(ret.begin(), ret.end());
	
	return ret;
}

int main(void) {
	ll n;
	cin >> n;
	
	vector<ll> Div = Divisors(n);
	
	for(auto& ans : Div) {
		cout << ans << endl;
	}
	
	return 0;
}
