#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  vector<int> f;
  for (int i = 1; i <= n; i++) {
    if (n % i == 0) f.push_back(i);
  }
  vector<int> dp(300, 0);
  dp[0] = 1;
  for (int i = 0; i < (int)f.size(); i++) {
    for (int j = 0; j < i; j++) {
      if (f[i] % f[j] == 0) dp[i] = max(dp[i], dp[j] + 1);
    }
  }
  int m = *max_element(dp.begin(), dp.end());
  for (int i = 299; i >= 0; i--) {
    if (dp[i] == m) {
      cout << f[i] << " ";
      m--;
    }
  }
}
