#include <bits/stdc++.h>
using namespace std;
const long long int N = 100005;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  {
    long long int i, j, k, n, m, ans = 0, cnt = 0, sum = 0;
    cin >> n;
    vector<long long int> v;
    cout << n << " ";
    i = n - 1;
    while (i > 0) {
      if (n % i == 0) {
        cout << i << " ";
        n = i;
        i = n - 1;
      } else {
        i--;
      }
    }
  }
}
