#include <bits/stdc++.h>
#include <limits>
using namespace std;
typedef unsigned long long int ull;
typedef long long int ll;
#define fi(i,n) for( ll i=0 ; i<n ; i++ )
#define f(i, a, b) for( ll i=a ; i<b ; i++ )
#define vi vector<int>
#define pb push_back
#define MOD 1000000007
ll digits(ll n)
{
    return floor(log10(double(n))) + 1;
}
void faster()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
}

ll modularExponentiation(ll x,ll n,ll M)
{
    ll result = 1;
    while(n>0)
    {
        if(n % 2 ==1)
        {
            result = ((result%M)*(x%M))%M;
        }
        x  = ((x%M)*(x%M))%M;
        n = n/2;
    }
    return result%M;
}
ll d, x, y;
void extendedEuclid(ll A, ll B)
{
    // for computing modular inverse
    // make b as Mod such that gcd of mod and a is 1
    // also the coeff x here will denote the modular inverse of a
    if(B == 0)
    {
        d = A;
        x = 1;
        y = 0;
    }
    else
    {
        extendedEuclid(B, A%B);
        int temp = x;
        x = y;
        y = temp - (A/B)*y;
        // x = y1
        // y = x1 - y1*(a/b);
    }
}
// DP solution for nCr
ll nCrModp(ll n, ll r)
{
    if (r > n - r)
        r = n - r;
    ll C[r + 1];
    memset(C, 0, sizeof(C));

    C[0] = 1;
    for (ll i = 1; i <= n; i++)
    {
        for (ll j = min(i,r); j > 0; j--)
        {
            C[j] = (C[j] + C[j - 1]);
        }

    }
    return C[r];
}
ll modInverse(ll A, ll M)
{
    extendedEuclid(A,M);
    return (x%M+M)%M;    //x may be negative
}

// primefactors[a] = primefactors[a/primedivisor[a]] + 1
ll binarySearch(vector<ll>&arr, ll l, ll r, ll x)
{
    while (l <= r)
    {
        int m = l + (r - l) / 2;
        if (arr[m] == x)
            return m;
        if (arr[m] < x)
            l = m + 1;
        else
            r = m - 1;
    }
    return -1;
}
vector<ll>v;
vector<ll> SieveOfEratosthenes(int n)
{
    bool prime[n+1];
    memset(prime, true, sizeof(prime));
    for (ll p=2; p*p<=n; p++)
    {
        if (prime[p] == true)
        {
            for (ll i=p*p; i<=n; i += p)
                prime[i] = false;
        }
    }

    for (ll p=2; p<=n; p++)
        if (prime[p])
            v.push_back(p);
    return v;
}

// 11 12 15 18 2 5 6 8 9 10
double fun(vector<double>&v, double m,double n)
{
    double s = 0;
    double ma = 0;
    double mi = 0;
    fi(i,n)
    {
        s += v[i] - m;
        ma = max(s,ma);
        mi = min(s,mi);
    }
    return ma - mi;
}
int main()
{
    faster();
    ll n;
    cin>>n;
    set<ll>st;
    for(ll i =1;i<=sqrt(n);i++)
    {
        if(n%i==0)
        {
            st.insert(i);
            st.insert(n/i);
        }
    }
    for(auto it = st.begin();it!=st.end();it++)
    {
        ll a = *it;
        cout<<a<<endl;
    }


}






#include <iostream>
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5, OO = 1e9;
long long   a[N] , j = 0;
long long n;
void divisor(long long value){
    long long i = 1;
    for( ; i * i < value; ++i){
        if(value % i == 0){
            a[j] = i;
            j++;
            a[j] = value / i;
            j++;
        }
    }
    if( i * i == value){
        a[j] = i;
        j++;
    }
}
int main() {
    cin >> n;
    divisor(n);
    sort(a , a + j);
    for(int i =0; i<j; ++i){
        cout << a[i] << endl;
    }

return 0;
}


	