#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, next = 0, j = 0;
  cin >> n;
  next = n;
  while (next > 1) {
    cout << next << " ";
    for (j = next / 2; j >= 1; j--)
      if (next % j != 0)
        continue;
      else
        next = j, j = 0;
  }
  cout << 1;
  return 0;
}
