#include <iostream>
using namespace std;
#include <bits/stdc++.h>
#include<math.h>
#include<vector>
int main() {
// your code goes here
int n;
cin>>n;
int i;
vector<int>ans;
int count=0;
for(i=1;i<=sqrt(n);i++)
{
if(n%i==0)
{
if(n/i==i)
{
ans.push_back(i);
count++;
}
else
{
ans.push_back(i);
ans.push_back(n/i);
count+=2;
}
}
}
cout<<count<<endl;
for (int i = ans.size() - 1; i >= 0; i--){
printf("%d ", ans[i]);
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwojaW5jbHVkZSA8Yml0cy9zdGRjKysuaD4KI2luY2x1ZGU8bWF0aC5oPgojaW5jbHVkZTx2ZWN0b3I+CmludCBtYWluKCkgewoJLy8geW91ciBjb2RlIGdvZXMgaGVyZQoJaW50IG47CgljaW4+Pm47CglpbnQgaTsKCXZlY3RvcjxpbnQ+YW5zOwoJaW50IGNvdW50PTA7Cglmb3IoaT0xO2k8PXNxcnQobik7aSsrKQoJICB7CgkgIAlpZihuJWk9PTApCgkgIAkgewoJICAJIAlpZihuL2k9PWkpCgkgIAkgCSB7CgkgIAkgCSAJYW5zLnB1c2hfYmFjayhpKTsKCSAgCSAJIAljb3VudCsrOwoJICAJIAkgfQoJICAJIAkgZWxzZQoJICAJIAkgIHsKCSAgCSAJICAJYW5zLnB1c2hfYmFjayhpKTsKCSAgCSAJICAJYW5zLnB1c2hfYmFjayhuL2kpOwoJICAJIAkgIAljb3VudCs9MjsKCSAgCSAJICB9CgkgIAkgfQoJICB9CgkgIAoJICBjb3V0PDxjb3VudDw8ZW5kbDsKCSBmb3IgKGludCBpID0gYW5zLnNpemUoKSAtIDE7IGkgPj0gMDsgaS0tKXsKCQlwcmludGYoIiVkICIsIGFuc1tpXSk7Cgl9CglyZXR1cm4gMDsKfQ==