#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int N;
  cin >> N;
  long long int cur = N;
  while (cur > 0) {
    if (N % cur == 0) {
      cout << cur << " ";
      N = cur;
    }
    cur--;
  }
  cout << endl;
  return 0;
}
