#include <bits/stdc++.h>
#define endl "\n"
#define ff first
#define ss second
#define PB push_back
#define MP make_pair
#define ll long long
#define llu unsigned long long
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define ABS(X) ((X) < 0 ? -(X) : (X))
#define LCM(X, Y) (((X) / (GCD((X), (Y)))) * (Y))
#define MEM(A, B) memset((A), (B), sizeof(A))
#define MEM_VEC(V, FILL) fill(V.begin(), V.end(), FILL)
#define FOR_EACH(IT, V) for (auto IT = V.begin(); IT != V.end(); IT++)
#define DEBUG_ARRAY_PRINT(A, I) cout << "at pos " << I << "  value is: " << A[I]
#define TURBO                         \
    ios_base::sync_with_stdio(false); \
    cin.tie(0);                       \
    cout.tie(0)
const double EPS = 1e-9;
const double PI = 3.1415926535897932384626433832795;
using namespace std;
inline ll GCD(ll A, ll B)
{
    if (B == 0)
        return A;
    return GCD((B), (A % B));
}
inline ll POW(ll BASE, ll EXP)
{
    ll RES = 1;
    for (ll I = 0; I < EXP; I++)
        RES *= BASE;
    return RES;
}
inline ll BIGMOD(ll a, ll p, ll m)
{
    ll res = 1 % m;
    ll x = a % m;
    while (p > 0)
    {
        if ((p & 1) > 0)
            res = (res * x) % m;
        x = (x * x) % m;
        p >>= 1;
    }
    return res;
}
inline void FILE_HANDLE()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}
int main()
{
    TURBO;
    //FILE_HANDLE() ;
    ll n;
    scanf("%lld", &n);
    vector<ll> v;
    for (ll i = 1; i * i <= n; i++)
    {
        if (n % i == 0)
        {
            if (n / i == i)
                v.PB(i);

            else
            {
                v.PB(i);
                v.PB(n / i);
            }
        }
    }
    sort(v.begin(), v.end());
    for (int i = 0; i < v.size(); i++)
        printf("%lld\n", v[i]);
}
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n) ;i++)

using namespace std;
using p=pair<int,int>;
typedef long long ll;

int main() {
  ll n;
  cin >> n;
  int counter = 0;
  for(int i=1; i <= sqrt(n);i++){
    if(n%i==0 && i!=sqrt(n)){
      counter+=2;
    }
    else if(n%i==0 && i==sqrt(n)){
      counter++;
    }
  }
  vector<ll>a(counter);
  int b = 0;
  for(int j = 1;j <= sqrt(n);j++){
    if(n%j == 0 && j != sqrt(n)){
      a[b] = j;
      a[counter-1-b] = n/j;
      b++;
    }
    else if(n%j == 0 && j == sqrt(n)){
      a[b] = j;
    }
  }
  for(int k = 0;k < counter;k++){
    cout << a[k] << endl;
  }
  
  return 0;

}