#include <bits/stdc++.h>

using namespace std;
#define ll long long

set<ll> st;

void count(ll N) {
	
	int k = (ll)sqrt(N);
	for(int i = 1; i<=k; i++) {
		if(N%i == 0){
		  st.insert(i);
		  st.insert(N/i);
		}
	}
}

int main(void) {
	
	long long N;
	cin >> N;
	count(N);
	for(auto i : st) {
		cout << i << '\n';
	}
	
	return 0;
}

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

#define  int               long long int
#define  ld                long double
#define  f(i,j,n)            for(int i = j; i <= n; i++)
#define  r(i,n,j)           for(int i = n; i >= j; i--)
#define  all(container)       container.begin() , container.end()
#define  sz(container)        (int)container.size()
#define  ff                first
#define  ss                second
#define  pii               pair <int , int>
#define  sp(x)              setprecision(x)
#define  mod              1000000007
#define  endl            "\n"
#define  pb              push_back
#define  mp             make_pair
#define  T             int ttt; cin >> ttt; while(ttt--)
#define fast           ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);

int power(int x, int y, int p)  
{  
    int res = 1;    
    x = x % p; 
    if (x == 0) return 0; 
    while (y > 0)  
    {     
        if (y & 1)  
            res = (res*x) % p;  
        y = y>>1; 
        x = (x*x) % p;  
    }  
    return res; 
}

int32_t main()
{
    fast
    int n;  cin>>n;
    vector<int>v;
    for(int i=1;i<=sqrt(n);i++){
        if(n%i==0)
        {
            v.pb(i);
            if(i*i!=n)  v.pb(n/i);
        }
    }
    if(sz(v)==0){
        v.pb(n);
        v.pb(1LL);
    }
    sort(all(v));
    f(i,0,sz(v)-1)  
        cout<<v[i]<<endl;
}