#include <bits/stdc++.h>
using namespace std;
vector<long long> ns;
vector<long long> ms;
int main() {
  long long x, t, c, a, n, m;
  cin >> x;
  int k = 0;
  int equ = 0;
  for (n = 1;; n++) {
    t = n * (n + 1) / 2;
    c = (n) * (n + 1) * (2 * n + 1) / 6 - n * t;
    if (c > x) break;
    a = n * (n + 1) - t;
    if ((x - c) % a == 0) {
      m = (x - c) / a;
      if (m < n) break;
      ns.push_back(n);
      ms.push_back(m);
      k++;
      if (m == n) {
        equ = 1;
        break;
      }
    }
  }
  if (equ) {
    k = 2 * k - 1;
    printf("%d\n", k);
    int sz = ns.size();
    for (int i = 0; i < sz; i++) {
      printf("%I64d %I64d\n", ns[i], ms[i]);
    }
    for (int i = sz - 2; i >= 0; i--) {
      printf("%I64d %I64d\n", ms[i], ns[i]);
    }
  } else {
    k = 2 * k;
    printf("%d\n", k);
    int sz = ns.size();
    for (int i = 0; i < sz; i++) {
      printf("%I64d %I64d\n", ns[i], ms[i]);
    }
    for (int i = sz - 1; i >= 0; i--) {
      printf("%I64d %I64d\n", ms[i], ns[i]);
    }
  }
  return 0;
}
