#include<bits/stdc++.h>
using namespace std;
const long long N=1e6+10;
inline int read(){
    int x=0,f=1;char ch=getchar();
    while(!isdigit(ch)){if(ch=='-')f=-f;ch=getchar();}
    while(isdigit(ch)){x=x*10+ch-48;ch=getchar();}
    return x*f;
}
long long n,a[N],tot;
signed main(){
    cin>>n;
    for(int i=1;i<=sqrt(n);i++){
        if(n%i==0){
            a[++tot]=i;
            if(i!=sqrt(n)) a[++tot]=n/i;
        }
    }
    sort(a+1,a+tot+1);
    for(int i=1;i<=tot;i++) {
         printf("%lld\n",a[i]);
    }
    return 0;
}

/*** I came, I saw, I conquered. ***/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;typedef unsigned long long ull;
#define sc(a) cin >> a
#define pf(a) cout << a << endl
#define forIn(arr, num) for(ll i = 0; i < num; i++) cin >> arr[i];
#define vpnt(ans) for(ll i = 0; i < ans.size(); i++) cout << ans[i] << (i + 1 < ans.size() ? ' ' : '\n');
#define mod 1000000007
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define GET_SET_BITS(a) (__builtin_popcount(a))
#define GET_SET_BITSLL(a) ( __builtin_popcountll(a))
#define GET_TRAIL_ZERO(a) (__builtin_ctz(a))
#define GET_LEAD_ZERO(a) (__builtin_clz(a))
#define GET_PARITY(a) (__builtin_parity(a))
#define no cout << "NO" << endl
#define yes cout << "YES" << endl
void go() {
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}
/*----------------------------------------------------------------*/
void solve() {
    ll n;
    sc(n);

    set<ll> s;
    s.insert(1);
    s.insert(n);
    for(ll i = 2;i * i <= n;i++) {
        if(n % i == 0) {
            s.insert(i);
            s.insert(n / i);
        }
    }

    for(auto it : s) {
        pf(it);
    }
}

int main() {
    go();
    solve();    
    return 0;
}