#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define FORR2(x,y,arr) for(auto& [x,y]:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
//-------------------------------------------------------

ll N;
set<ll> A;
void solve() {
	int i,j,k,l,r,x,y; string s;
	
	cin>>N;
	for(i=1;1LL*i*i<=N;i++) if(N%i==0) A.insert(i),A.insert(N/i);
	FORR(a,A) cout<<a<<endl;
}


int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
	FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	cout.tie(0); solve(); return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll  long long int 
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL)
#define br cout<<endl;
#define pb push_back
#define left(x) x.begin(), x.end()
#define right(x) x.begin(), x.end(), greater<ll>()
#define mp make_pair
#define M -1000000005
void solve(){ 
    ll n;
    cin>>n; 
    set<ll>a;
    for(ll i = 1; i <= sqrt(n); ++i){
        if(n % i == 0){
            a.insert(i);
            a.insert(n/i);
        }
    }
    for(auto i:a){cout<<i;br}
}
int main(){
    fast;
    ll q=1;
    while(q--){
        solve();br;
    }    
}
