https://drive.google.com/file/d/1hT7KMovO2nfeEYPRp-BQCEibM4UaBVMo/view
#include <bits/stdc++.h>
#define hieuhfgr ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ll long long
#define ull unsigned long long
#define gcd __gcd
#define pb push_back
#define fi first
#define se second
#define endl "\n"
#define inputfile "CAKES.inp"
#define outputfile "CAKES.out"
#define file freopen(inputfile, "r", stdin);freopen(outputfile, "w", stdout)
using namespace std;
int main(){
hieuhfgr;
file;
ll n;
cin >> n;
vector<ll> v;
for (ll i = 1;i * i <= n;i++) {
if(n % i == 0) {
v.pb(i);
if (n /i != i) v.pb(n/i);
}
}
sort(v.begin(), v.end());
for (auto i : v) cout << i << endl;
return 0;
}