#include <bits/stdc++.h>
using namespace std;
typedef long long int lld;
typedef pair<int,int> pi;
typedef pair<lld,lld> pl;
typedef pair<int,lld> pil;
typedef pair<lld,int> pli;
typedef vector<int> vit;
typedef vector<vit> vitt;
typedef vector<lld> vlt;
typedef vector<vlt> vltt;
typedef vector<pi> vpit;
typedef vector<vpit> vpitt;
typedef long double ld;
#define x first
#define y second
#define pb push_back
#define all(v) v.begin(), v.end()
#define sz(x) (int)x.size()
#define mk(a,b) make_pair(a,b)
bool isrange(int y,int x,int n,int m){
	 if(0<=y&&y<n&&0<=x&&x<m) return true;
	 return false;
}
int dy[4] = {1,0,-1,0},dx[4]={0,1,0,-1},ddy[8] = {1,0,-1,0,1,1,-1,-1},ddx[8] = {0,1,0,-1,1,-1,1,-1};


void solve(int tc){
	int n;
	cin >> n;
	int p = 1;
	while(true){
		if(p*(p+1)>=2*n){
			cout << p << "\n";
			break;
		}
		p++;
	}
}


int main(void){
	/*
	ios_base :: sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	*/
	int tc = 1;
	/*
		cin >> tc;
	*/
	for(int test_number=1;test_number<=tc;test_number++){
		solve(test_number);
	}
	return 0;
}
#include "bits/stdc++.h"
using namespace std ;
#define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
void solve()
{
    long long n ;
    cin >> n ;
    vector<long long> v ;
    for(int i=1; i<=sqrt(n); i++)
    {
        if(n % i == 0)
        {
            cout << i << "\n" ;
            if(n / i != i)
                v.emplace_back(n / i) ;
        }
    }
    for(int i=v.size()-1; i>=0; i--)
        cout << v[i] << "\n" ;
}

int main()
{
    fastio
    int t = 1;
    //cin >> t ;
    while(t--)
    {
        solve() ;
    }
}