# Codeforces Round #332 (Div. 2)D. Spongebob and Squares（数学方程，暴力）


#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define X first
#define Y second
#define cl(a,b) memset(a,b,sizeof(a))
typedef pair<long long ,long long > P;
const int maxn=100005;
const LL inf=1LL<<45;
const LL mod=1e9+7;
vector<P> ans;
int main(){
LL x;scanf("%lld",&x);
ans.pb(P(1,x/1));
bool same=false;
if(1==x/1)same=true;
for(LL n=2;n<=10000000||n*n*n<=x;n++){
LL a=6*x+n*n*n-n;
LL b=3*n*n+3*n;
if(a%b==0){
if(n==a/b)same=true;
if(n<=a/b)ans.pb(P(n,a/b));
}
}

int N=2*ans.size();
if(same)N-=1;
printf("%d\n",N);
for(int i=0;i<ans.size();i++){
printf("%lld %lld\n",ans[i].X,ans[i].Y);
}
for(int i=ans.size()-1;i>=0;i--){
if(ans[i].X!=ans[i].Y)printf("%lld %lld\n",ans[i].Y,ans[i].X);
}
return 0;
}



#### Codeforces Round #444 (Div. 2)-贪心&尺取-Ratings and Reality Shows

2017-11-11 20:11:11

#### Codeforces Round #446 (Div. 2) D. Gluttony

2017-11-18 21:07:25

#### Codeforces Round #481 (Div. 3) D. Almost Arithmetic Progression （暴力）

2018-05-13 22:34:00

#### CF-Codeforces Round #483 (Div. 2)-D-XOR-pyramid

2018-05-16 01:15:04

#### Codeforces Round #426 (Div. 2) D. The Bakery（DP+线段树）

2017-07-31 09:16:44

#### Educational Codeforces Round 36 (Rated for Div. 2) 题解

2018-01-13 23:16:24

#### Codeforces Round #476 (Div. 2) [Thanks, Telegram!] D - Single-use Stones（思维）

2018-04-27 00:50:37

#### Codeforces Round #480 (Div. 2): D. Perfect Groups（思维题）

2018-05-09 17:29:44

#### Codeforces Round #483 (Div. 2) D. XOR-pyramid

2018-05-16 14:27:28

#### Codeforces Round #402 (Div. 2)C. Dishonest Sellers【贪心】这个贪心好水啊....

2017-02-27 13:07:44