#include <iostream>
#include <stdio.h>
#include <cstring>
#include <cstdio>
#include <math.h>
#include <algorithm>
#include <vector>
#include <string>
#include <stdlib.h>
#include <queue>
#include <stack>
#include <utility>
#include <fstream>
//#include <random>
#include <map>
//#include <unordered_map>
#include <cstdlib>
#include <functional>
#include <time.h>
//#include <chrono>
#include <sstream>
#include <iomanip>
#include <numeric>
#include <iostream>
#include <limits>
#include <numeric>
//#include <type_traits>
#define rep(i,n) for(int i=0;i<n;i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ll long long
#define INF 1000000001
#define MOD 1000000007
#define SORT(s) sort(s.begin(), s.end());
#define REVERSE(s) reverse(s.begin(), s.end());
#define SUM(s) accumulate(s.begin(), s.end(), 0LL);
#define P pair<int,int>
#define mp make_pair
#define valid(x,y,h,w) (0<=x&&x<h&&0<=y&&y<w)
//#define int ll
int dx[4] = { 0,1,0,-1 };
int dy[4] = { 1,0,-1,0 };
int ndx[8] = { 0,1,0,-1, 1,1,-1,-1 };
int ndy[8] = { 1,0,-1,0, 1,-1,-1,1 };
double pi = 3.141592653589793;
using namespace std;
int POW(int x, int y) { return int(pow(double(x), double(y))); }
double log(double a, double b) { return log(b) / log(a); }




int main() {
	ll n;
	cin >> n;
	int sq = sqrt(n);
	vector<ll> ans;
	FOR(i, 1, sq + 1) {
		if (n % i == 0) {
			ll x = n / i;
			if (x == i) {
				ans.push_back(i);
			}
			else if (x < i) {

			}
			else {
				ans.push_back(i);
				ans.push_back(x);
			}
		}
	}
	SORT(ans);
	rep(i, ans.size()) {
		cout << ans[i] << endl;
	}
}





    #include<bits/stdc++.h>
    using namespace std;
     
    typedef long long ll;
    const char nl = '\n';
     
    template <class T>
    ostream &operator <<(ostream &os, const vector<T>&v)
    {
        for(auto& x:v)os << x << " ";
        return os;
    }
     
    template <class a, class b>
    ostream &operator <<(ostream &os, const pair<a,b>&p)
    {
        os << "(" << p.first << "," << p.second << ")";
        return os;
    }
     
    #define all(x) x.begin(),x.end()
    #define pb push_back
     
    int main()
    {
        ll n,i;
        vector<ll>v;
        cin >> n;
        for(i=1 ; i*i<=n ; i++)
        {
            if(n%i==0)
            {
                if(i*i==n)v.pb(i);
                else
                {
                    v.pb(i);
                    v.pb(n/i);
                }
            }
        }
        sort(all(v));
        for(auto x:v)
            cout << x << nl;
        return 0;
    }