#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <fstream>
#include <cassert>
#include <cstring>
#include <numeric>
#include <ctime>
#include <complex>
#include <bitset>
#include <random>
#include <stack>
#include <climits>

using namespace std;

typedef long long ll;
typedef long double ld;

#define int ll
#define double ld
#define loop(i, n) for(int i = 0; i < (int)n; ++i)
#define loop1(i, n) for(int i = 1; i <= (int)n; ++i)
#define F first
#define S second
#define pb push_back
#define pi pair <int, int>
#define all(x) begin(x), end(x)
//#define ti tuple <int, int, int>
#define Point Vect
#define mkt make_tuple
#define mkp make_pair
#define no {cout << "NO\n"; return;}

void solve() {
    int n; cin >> n;
    vector <int> ans;
    for (int i = 1; i * i <= n; ++i) {
        if (n % i == 0) {
            ans.pb(i);
            ans.pb(n / i);
        }
    }
    if (ans[ans.size() - 1] == ans[ans.size() - 2])
        ans.pop_back();
    sort(all(ans));
    for (int x : ans)
        cout << x << "\n";
}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    //int t; cin >> t; loop(i, t)
    solve();
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

vector<ll> divisors (ll n) {
  vector<ll> dest;
  for (ll i = 1; i < floor(pow(n, 0.5) + 1); i++) {
    if (n % i == 0) {
      dest.push_back(i);
      if (floor(n / i) != i) {
        dest.push_back(floor(n / i));
      }
    }
  }
  sort(dest.begin(), dest.end());
  return dest;
}

int main () {
  ll n;
  cin >> n;

  auto ans = divisors(n);
  for (ll i = 0; i < (ll)ans.size(); i++) {
    cout << ans[i] << endl;
  }
  
}