#include<bits/stdc++.h>
using namespace std;
#define ll long long 
#define f(i,a,b,c) for(ll i=a;i<b;i+=c)
#define r(i,a,b,c) for(ll i=a;i>=b;i-=c)
#define mod 1000000007

int main(){
    ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
    ll n; cin >> n;
    vector<ll> ar;
    ll s = sqrt(n);
    // cout << s << "\n";
    f(i,1,s+1,1){
    	if(n%i==0){
    		ar.push_back(i);
    		if(i!=(n/i)) ar.push_back(n/i);
    	}
    }
    sort(ar.begin(),ar.end());
    f(i,0,ar.size(),1){
    	cout << ar[i] << "\n";
    }
    return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main(){
	long n,i;
  	cin>>n;
  	set<long, less<long>> mySet;
  	for(i=1;i*i<=n;i++){
    	if(n%i == 0){
          mySet.insert(i);
            mySet.insert(n/i);
        }
    }
  	for(long j:mySet){
    	cout<<j<<"\n";
    }
	return 0;
}
