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

typedef long long ll;

int main(){
    ll n;
    cin>>n;

    set<ll> memo;
    for(ll i=1; i*i<=n; i++){
        if(n%i==0){
            memo.insert(i);
            memo.insert(n/i);
        }
    }
    for(auto x : memo){
        cout<<x<<endl;
    }
    

    return 0;
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(ll i=0; i<n; ++i)
#define rep1(i,n) for(ll i=1; i<=n; ++i)
#define revrep(i,n) for(ll i=n-1; i>=0; --i)
inline constexpr ll Inf = (1ULL << 62) -1;
#define fastio cin.tie(nullptr); ios_base::sync_with_stdio(false);
#define endl '\n'
#define YN(e) ((e)?"Yes":"No")
template <class T> bool updmax(T& a, T b) { if (b > a) { a = b; return true;} return false;}
template <class T> bool updmin(T& a, T b) { if (b < a) { a = b; return true;} return false;}

int main() {
    fastio;
    ll N;
    cin >> N;
    ll m = sqrt(N) + 10;
    vector<ll> d, a;
    ll i=1;
    for (; i<m; ++i) {
        if (N % i == 0 && i*i <= N) {
            d.push_back(i);
        }
    }
    a = d;
    rep(i, (int)d.size()) {
        a.push_back(N / d[i]);
    }
    sort(begin(a), end(a));
    a.erase(unique(begin(a), end(a)), end(a));
    rep(i, (int)a.size())
        cout << a[i] << endl;
}