#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define ld long double

vector<ll> count_divisor(ll& n) {
	vector<ll> ret;
	for (ll i = 1; i * i <= n; ++i) {
		if (n % i == 0) {
			ret.push_back(i);
			if (n / i != i)
				ret.push_back(n / i);
		}
	}
	sort(ret.begin(), ret.end());
	return ret;
}

int main(void) {
	ll N; cin >> N;
	auto res = count_divisor(N);
	for (ll& r : res)
		cout << r << endl;
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL <<60;
const long long Mo=1000000007;

long long gcn(long long x,long long y){
  if(x%y==0){
    return y;  
  }
  else{
    return gcn(y,x%y);
  }
}

long long modpow(long long a, long long n, long long mod) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}

int main(void){
  long long tmp,res=0,cnt=0;
  long long i,j;
  long long n,k;

  cin>>n;
  tmp=pow(n,0.5);
  long long div[2*tmp+1]={};
  for(i=1;i<=tmp;i++){
    if(n%i==0){
      if((i*i)!=n){
        div[cnt]=i;
        div[cnt+1]=n/i;
        cnt+=2;
      }
      else {
        div[cnt]=i;
        cnt++;
      }
    }
  }
  sort(div,div+(2*tmp+1));
  for(i=0;i<2*tmp+1;i++){
    if(div[i]>0){
      cout<<div[i]<<endl;
    }
  }

  cout<<endl;
  
  //precision(15)<<res<<endl;
  //cout<<res<<endl;
  
  return 0;
}