//Bai 4
#include<bits/stdc++.h>
using namespace std;
#define el "\n"
#define ll long long
#define ull unsigned long long
#define se second
#define fi first
#define be begin()
#define en end()
#define Faster cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
void Run(ll n)
{
vector<ll> vt;
for(int i = 1; i <= sqrt(n); i++)
{
if(n % i == 0)
{
vt.push_back(i);
if(n / i != i) vt.push_back(n / i);
}
}
sort(vt.be, vt.en);
for(auto x : vt) cout << x << " ";
}
int main()
{
Faster;
ll n; cin >> n;
Run(n);
return 0;
}
Ly9CYWkgNAoKI2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKI2RlZmluZSBlbCAiXG4iCiNkZWZpbmUgbGwgbG9uZyBsb25nCiNkZWZpbmUgdWxsIHVuc2lnbmVkIGxvbmcgbG9uZwojZGVmaW5lIHNlIHNlY29uZAojZGVmaW5lIGZpIGZpcnN0CiNkZWZpbmUgYmUgYmVnaW4oKQojZGVmaW5lIGVuIGVuZCgpCiNkZWZpbmUgRmFzdGVyIGNpbi50aWUoMCk7IGNvdXQudGllKDApOyBpb3NfYmFzZTo6c3luY193aXRoX3N0ZGlvKDApOwoKdm9pZCBSdW4obGwgbikKewogICAgdmVjdG9yPGxsPiB2dDsKICAgIGZvcihpbnQgaSA9IDE7IGkgPD0gc3FydChuKTsgaSsrKQogICAgewogICAgICAgIGlmKG4gJSBpID09IDApCiAgICAgICAgewogICAgICAgICAgICB2dC5wdXNoX2JhY2soaSk7CiAgICAgICAgICAgIGlmKG4gLyBpICE9IGkpIHZ0LnB1c2hfYmFjayhuIC8gaSk7CiAgICAgICAgfQogICAgfQogICAgc29ydCh2dC5iZSwgdnQuZW4pOwogICAgZm9yKGF1dG8geCA6IHZ0KSBjb3V0IDw8IHggPDwgIiAiOwp9CmludCBtYWluKCkKewogICAgRmFzdGVyOwogICAgbGwgbjsgY2luID4+IG47CiAgICBSdW4obik7CiAgICByZXR1cm4gMDsKfQoK