#include<bits/stdc++.h>
using namespace std;
#define ll long long
int a[1000005];
bool isping(int n) {
return (int)(sqrt(n)) * (int)(sqrt(n)) == n;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n, p = 0;
cin >> n;
for (int i = 1; i <= sqrt(n); i++) {
if (!(n % i)) {
if (i == 1) {
cout << i;
a[++p] = i;
} else {
cout << endl << i;
a[++p] = i;
}
}
}
for (int i = p - isping(n); i >= 1; i--) {
cout << endl << n / a[i];
}
return 0;
}