#include <bits/stdc++.h>
using namespace std;
int main() {
long long k;
cin >> k;
// b == k*a/(a-k) == k+k*k/(a-k)
set< pair<long long,long long> > S;
vector< pair<long long,int> > P;
int k2 =k;
for(int i =2; i*i <= k2; i++) if(k2%i == 0) {
int x =0;
while(k2%i == 0) {k2 /=i; x++;}
P.push_back(make_pair(i,2*x));}
if(k2 > 1) P.push_back(make_pair(k2,2));
vector<long long> D(1,1);
for(int i =0; i < P.size(); i++) {
int N =D.size();
for(int j =0; j < N; j++) {
long long d =D[j];
for(int l =1; l <= P[i].second; l++) {
d *=P[i].first;
D.push_back(d);}
}
}
for(int i =0; i < D.size(); i++)
S.insert(make_pair(k*k/D[i]+k,D[i]+k));
cout << S.size() << "\n";
for(auto it =S.begin(); it != S.end(); it++)
cout << it->first << " " << it->second << "\n";
return 0;}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCWxvbmcgbG9uZyBrOwoJY2luID4+IGs7CgkvLyBiID09IGsqYS8oYS1rKSA9PSBrK2sqay8oYS1rKQoJc2V0PCBwYWlyPGxvbmcgbG9uZyxsb25nIGxvbmc+ID4gUzsKCXZlY3RvcjwgcGFpcjxsb25nIGxvbmcsaW50PiA+IFA7CglpbnQgazIgPWs7Cglmb3IoaW50IGkgPTI7IGkqaSA8PSBrMjsgaSsrKSBpZihrMiVpID09IDApIHsKCQlpbnQgeCA9MDsKCQl3aGlsZShrMiVpID09IDApIHtrMiAvPWk7IHgrKzt9CgkJUC5wdXNoX2JhY2sobWFrZV9wYWlyKGksMip4KSk7fQoJaWYoazIgPiAxKSBQLnB1c2hfYmFjayhtYWtlX3BhaXIoazIsMikpOwoJdmVjdG9yPGxvbmcgbG9uZz4gRCgxLDEpOwoJZm9yKGludCBpID0wOyBpIDwgUC5zaXplKCk7IGkrKykgewoJCWludCBOID1ELnNpemUoKTsKCQlmb3IoaW50IGogPTA7IGogPCBOOyBqKyspIHs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