#include<bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR(i,a,b) for(i= a ; i < b ; ++i)
#define rep(i,n) FOR(i,0,n)
#define rev(i,n) for(i=n-1;i>=0;i--)
#define INF INT_MAX
#define pb push_back
#define tc int t;cin>>t;while(t--)
#define mod (int)(1e9 + 7)
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define endl "\n"
#define si set<int> 
#define lld unsigned long long int
void factors(ll x) {
    vector <ll> result;
    ll i = 1;
    while(i*i <= x) {
        if(x % i == 0) {
            result.push_back(i);
            if(x/i != i) {
                result.push_back(x/i);
            }
        }
        i++;
    }
    sort(result.begin(),result.end());
        for(ll i=0; i<result.size(); i++) {
            cout << result[i] <<endl;
        }
        //cout << endl;
}
int main()
{
    fastio;
    ll n;
    cin>>n;
    factors(n);
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main(){
    long long int n;
cin>>n;
vector<long int> t(0);
int f=2;
for (long int i = 1; i <= sqrt(n); i++)
{
   if (n%i==0)
   {
       t.push_back(i);
       if(i!=n/i){
           t.push_back(n/i);
       }
   }
   }
sort(t.begin(), t.end());

/*while (f<=n)
{
    if(n%f==0){
        n=n/f;
        t.push_back(f);
        
    }
    else
    {
        f++;
    }
    
}

*/

for (int i = 0; i < t.size(); i++)
{
cout<<t[i]<<endl;
}


}