#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  while (t--) {
    int n, ans = 0;
    cin >> n;
    ans = n;
    for (int i = n; i >= 1; i--) {
      if (ans % i == 0) {
        ans = i, cout << ans << " ";
      }
    }
  }
}
