#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <climits> // FOO_MAX, FOO_MIN
#include <cmath> 
#include <cstdlib> // abs(int)
#include <numeric>
#include <iomanip>
#include <map>

using namespace std;

#define roundup(n,d) ( ((n) + ((d)-1)) / (d) )
#define assign_max(into, compared) (into = max((into), (compared)))
#define assign_min(into, compared) (into = min((into), (compared)))
#define rep(i,n) for(long long i = 0;i < n;++i)
#define v_in(v) for(auto&& i : v) cin >> i
#define FAST_IO ios::sync_with_stdio(false); cin.tie(nullptr);
#define fix(n) fixed << setprecision(n)
#define ALL(v) v.begin(),v.end()

#define PI 3.14159265358979323846

using ll = long long;
using ull = unsigned long long;
using vll = vector<long long>;
using vvll = vector<vector<long long>>;

bool is_prime(int n){
    if (n <= 1) return false;
    if (n == 2) return true;
    if (n % 2 == 0) return false;
    const int limit = min(((int)sqrt(n))+1,n);
    for(int i = 3;i <= limit;i+=2){
        if (n % i == 0){
            return false;
        }
    }
    return true;
}
//[2,limit]
vector<int> primenumbers(int limit){
    vector<int> primes;
    for(int i = 2;i <= limit;i++){
        if(is_prime(i)){
            primes.push_back(i);
        }
    }
    return primes;
}

vector<ll> all_divisors (ll n){
    if (n <= 0) return vll();

    vll lt_or_eq_sqrt(0); //sqrt以下の約数が入る
    vll gt_sqrt(0); //sqrt超過の約数が入る

    for(ll i = 1, square_n = sqrt(n);i <= square_n;i++){
        if(n % i == 0){
            //昇順に入る
            lt_or_eq_sqrt.push_back(i);
            if(i != n / i){
                //降順に入る
                gt_sqrt.push_back(n / i);
            }
        }
    }
    reverse(ALL(gt_sqrt));
    lt_or_eq_sqrt.insert(lt_or_eq_sqrt.end(),ALL(gt_sqrt));
    return lt_or_eq_sqrt;
}


int main(void){
    FAST_IO
    
    ll n;
    cin >> n;
    auto v = all_divisors(n);
    for(ll i : v){
        cout << i << endl;
    }
    return 0;
}
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

vector<long long> enum_divisors(long long N) {
    vector<long long> res;
    for (long long i = 1; i * i <= N; ++i) {
        if (N % i == 0) {
            res.push_back(i);
            // 重複しないならば i の相方である N/i も push
            if (N/i != i) res.push_back(N/i);
        }
    }
    // 小さい順に並び替える
    sort(res.begin(), res.end());
    return res;
}

int main() {
    long long N;
    cin >> N;
    const auto &res = enum_divisors(N);
    for (int i = 0; i < res.size(); ++i) cout << res[i] << "\n";
    cout << endl;
}