#include <bits/stdc++.h>
using namespace std;
int solve(int x) {
  int m;
  if (x == 1) {
    return 1;
  } else {
    for (int i = x - 1; i > 0; i--) {
      if (x % i == 0) {
        if (i != 1) {
          cout << i << " ";
        }
        m = i;
        break;
      }
    }
    return solve(m);
  }
}
int main() {
  int n;
  cin >> n;
  if (n != 1) {
    cout << n << " ";
    cout << solve(n) << endl;
  } else {
    int k = 1;
    cout << k << endl;
  }
  return 0;
}
