#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MAX 510000
#define MOD 998244353
#define rep(i, n) for (ll i = 0; i < n; ++i)

void solve(void)
{
    ll n;
    cin >> n;
    set<ll> st;
    for (ll i = 1; i * i <= n; ++i)
    {
        if (n % i == 0)
        {
            ll j = n / i;
            st.insert(i);
            if (n % j == 0)
                st.insert(j);
        }
    }
    for (auto i : st)
        cout << i << "\n";
}
int main(void)
{
    solve();
}

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

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, s, e) for (int i = (int)(s); i < (int)(e); i++)
#define _rep(i, n) for (int i = (int)(n - 1); i >= 0; i--)
#define _REP(i, e, s) for (int i = (int)(e - 1); i >= (int)(s); i--)

#define yes cout << "yes" << endl;
#define Yes cout << "Yes" << endl;
#define YES cout << "YES" << endl;

#define no cout << "no" << endl;
#define No cout << "No" << endl;
#define NO cout << "NO" << endl;

#define AC cout << "AC" << endl;
#define WA cout << "WA" << endl;

#define out(s) cout << s << endl;

#define ll long long
#define ull unsigned long long

const unsigned int BIT_FLAG_0 = (1 << 0);  // 0000 0000 0000 0001
const unsigned int BIT_FLAG_1 = (1 << 1);  // 0000 0000 0000 0010
const unsigned int BIT_FLAG_2 = (1 << 2);  // 0000 0000 0000 0100
const unsigned int BIT_FLAG_3 = (1 << 3);  // 0000 0000 0000 1000
const unsigned int BIT_FLAG_4 = (1 << 4);  // 0000 0000 0001 0000
const unsigned int BIT_FLAG_5 = (1 << 5);  // 0000 0000 0010 0000
const unsigned int BIT_FLAG_6 = (1 << 6);  // 0000 0000 0100 0000
const unsigned int BIT_FLAG_7 = (1 << 7);  // 0000 0000 1000 0000

const double PI = 3.14159265358979323846;

const int dy[4] = {0, 1, 0, -1};
const int dx[4] = {1, 0, -1, 0};

#define H_MAX 500
#define W_MAX 500
#define INF 1e9 + 7
const long long MOD = 1000000007;

int main() {
    ll N;
    cin >> N;
    vector<ull> v, v2;
    for (int i = 1; i <= sqrt(N); i++) {
        if (N % i == 0) {
            v.push_back(i);
            if (i != sqrt(N)) {
                v2.push_back(N / i);
            }
        }
    }
    for (int i = 0; i < v.size(); i++) {
        cout << v[i] << endl;
    }
    for (int i = 0; i < v2.size(); i++) {
        cout << v2[v2.size() - 1 - i] << endl;
    }
}