/*

  (                                 _
   )                               /=>
  (  +____________________/\/\___ / /|
   .''._____________'._____      / /|/\
  : () :              :\ ----\|    \ )
   '..'______________.'0|----|      \
                    0_0/____/        \
                        |----    /----\
                       || -\\ --|      \
                       ||   || ||\      \
                        \\____// '|      \
Bang! Bang!                     .'/       |
                               .:/        |
                               :/_________|

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 BALJOT SINGH
 EVERYONE HAS THEIR OWN TIME
~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define FAST ios_base :: sync_with_stdio (false); cin.tie (NULL)

using namespace std;
typedef long long  ll;
const ll M = 1e9 + 7;
const ll iM = 1e5 + 5;
const ll inf = 2e18;
//modular arithmetic worst part-----------------------------------
ll mod(ll x){  return (x%M+M)%M;}
ll mod_min(ll a, ll b){ ll ans= (mod(a)-mod(b)); if(ans<0) ans=mod(ans+M); return ans;}
ll mod_mul(ll a,ll b){  return mod(mod(a)*mod(b));}
ll mod_add(ll a,ll b){ return mod(mod(a)+mod(b));}
ll power(ll x,ll y)  {  ll res = 1;if (x == 0) return 0;while (y > 0){if (y & 1) res=mod_mul(res,x); y = y>>1; x=mod_mul(x,x);} return res;}
ll gcd_extend(ll a, ll b, ll& x, ll& y) {if (b == 0) {x = 1;y = 0;return a;}ll x1, y1;ll d = gcd_extend(b, a % b, x1, y1);x = y1;y = x1 - y1 * (a / b);return d;}
ll modinverse(ll value) {ll x, y;ll res=gcd_extend(value,M,x,y);if(res!=1)return -1;return mod(x);}
//----------------------------------------------------------------------------------------------------------------------------------




int main()
{

FAST;
ll n;
cin>>n;
vector<ll> v;
for(ll i=1;i*i<=n;i++)
    if(n%i==0)
        cout<<i<<"\n",v.push_back(n/i);
for (ll i = v.size() - 1; i >= 0; i--)
        if(v[i]!=sqrt(n))
           cout<<v[i]<<"\n";

}




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

#define fill(a, b) memset(a, b, sizeof(a))

typedef long long ll;
typedef long double lld;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef pair<int, int> ii;
typedef pair<ll, ll> pll;
typedef vector<ii> vii;
typedef vector<pll> vll;
typedef set<int> si;
typedef map<string, int> msi;

const int N = 1000010;
const ll MOD = 1e9 + 7;

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

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  // int t;
  // cin >> t;
  // for (int i = 0; i < t; i++) {
  //   solve();
  // }
  solve();
}