#include <iostream>
#include <vector>
using namespace std;
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int liczba;
cin>>liczba;
vector<int> dzielniki(liczba,0);
for(int i=1;i<liczba;i++){
if(liczba%i==0)
dzielniki.push_back(i);}
for(int i=1;i<liczba;i++)
{
if(dzielniki[i]>0)
cout<<dzielniki[i]<<endl;;
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKXsKICAgIAogICAgaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbygwKTsKICAgIGNpbi50aWUoMCk7CiAgICBjb3V0LnRpZSgwKTsKICAgIAogICAgaW50IGxpY3piYTsKICAgIGNpbj4+bGljemJhOwogICAgdmVjdG9yPGludD4gZHppZWxuaWtpKGxpY3piYSwwKTsKICAgIGZvcihpbnQgaT0xO2k8bGljemJhO2krKyl7CiAgICBpZihsaWN6YmElaT09MCkKICAgIGR6aWVsbmlraS5wdXNoX2JhY2soaSk7fSAgIAogICAgZm9yKGludCBpPTE7aTxsaWN6YmE7aSsrKQogICAgewogICAgICAgIGlmKGR6aWVsbmlraVtpXT4wKQogICAgICAgIGNvdXQ8PGR6aWVsbmlraVtpXTw8ZW5kbDs7CiAgICB9CiAgICAKfQ==