#include <bits/stdc++.h>
using namespace std;
void solve(int);
int main() {
  solve(0);
  return 0;
}
long long dvd[2000000], off[2000000];
void solve(int tc) {
  memset(dvd, 0, sizeof(dvd));
  for (int x = 1, _c = 2000000; x < _c; ++x) dvd[x] = dvd[x - 1] + x;
  for (int x = 1, _c = 2000000; x < _c; ++x) off[x] = off[x - 1] + dvd[x - 1];
  long long i;
  scanf("%I64d", &i);
  queue<pair<long long, long long> > q;
  stack<pair<long long, long long> > s;
  for (int x = 1, _c = 2000000; x < _c; ++x) {
    long long y = (i + off[x]) / dvd[x];
    if (y < x) break;
    if ((i + off[x]) % dvd[x]) continue;
    if (y > x) s.push(make_pair(y, (long long)x));
    q.push(make_pair((long long)x, y));
  }
  while (!s.empty()) {
    q.push(s.top());
    s.pop();
  }
  printf("%d\n", q.size());
  while (!q.empty()) {
    pair<long long, long long> tmp = q.front();
    q.pop();
    printf("%I64d %I64d\n", tmp.first, tmp.second);
  }
}
