#include <bits/stdc++.h>
using namespace std;
long long x;
set<pair<long long, long long> > answ;
int main() {
  scanf("%I64d", &x);
  long long NM, N, M, EMPTY;
  long long top, down, parb;
  NM = 0;
  N = M = EMPTY = 0;
  for (long long n = 1;; n++) {
    NM = n;
    N += (n)-1;
    M += (n)-1;
    EMPTY += (n - 1) * (n - 1);
    parb = NM * (n * n) - N * n - M * n + EMPTY;
    if (parb > x) break;
    top = (x + N * n - EMPTY);
    down = (NM * n - M);
    if (top % down == 0) {
      long long m = top / down;
      answ.insert(make_pair(n, m));
      answ.insert(make_pair(m, n));
      if (m < n) break;
    }
  }
  printf("%d\n", (int)answ.size());
  for (set<pair<long long, long long> >::iterator it = answ.begin();
       it != answ.end(); it++) {
    printf("%I64d %I64d\n", it->first, it->second);
  }
}
