#include <bits/stdc++.h>

#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define ps(x, y) fixed << setprecision(y) << x
#define int long long

using namespace std;

typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vp;

// Global

const int INF = 1e18;


void solve() {
    int n;
    cin >> n;
    vi res;
    for(int i = 1; i <= sqrt(n); i++) {
        if(n % i == 0) {
            res.emplace_back(i);
            if(n / i != i)
                res.emplace_back(n / i);
        }
    }
    sort(all(res));
    for(auto &i: res)
        cout << i << '\n';
}

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    solve();
}
//Coded By Vishal Mourya - The Legendary Coder
#include<bits/stdc++.h>
#define ll long long int
#define vec vector<ll>
#define f(var,a,b) for(ll var = a ; var < b ; var++ )
#define fr(var,a,b) for(ll var = a ; var > b ; var-- )
#define fasthoja ios_base::sync_with_stdio(false); cin.tie(NULL);
using namespace std;
int main(void){
    fasthoja;
    ll x; cin >> x;
    if( x >= 0 ) cout << x << "\n";
    else cout << "0\n";
    return 0;
}