#include<bits/stdc++.h>
using namespace std;
int main(){
	long long N;
	cin >> N;
	vector<long long> ans_front;
	vector<long long> ans_back;
	for(int i=1;i<sqrt(N);i++){
		if(N%i==0){
			ans_front.push_back(i);
			ans_back.push_back(N/i);
		}
	}
	if(sqrt(N) - (int)sqrt(N) ==0){
		ans_front.push_back(sqrt(N));
	}
	for(int i=0;i<ans_front.size();i++){
		cout << ans_front[i] << endl;
	}
	for(int i=ans_back.size()-1;i>=0;i--){
		cout << ans_back[i] << endl;
	}
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL<<62
#define inf 1000000007

int main() {
	ll n;
	cin>>n;
	map<ll,ll>q;
	for(ll i=1;i*i<=n;i++){
		if(n%i==0){
			q[i]++;
			q[n/i]++;
		}
	}
	for(auto itr=q.begin();itr!=q.end();itr++){
		ll now=itr->first;
		cout <<now<<endl;
	}
	// your code goes here
	return 0;
}