#include <bits/stdc++.h>
using namespace std;
const int MXN = 3e6 + 10;
long long m, r, c, x, MX = 3e6, A[MXN];
long double P[MXN];
long long Solve(long long n) {
  long long t = (long long)(x - P[n - 1] +
                            (((long double)n) * n * (n - 1) / 2)),
            k = (n * n + n) / 2;
  if (t % k != 0 || t < 0) return (-1);
  return (t / k);
}
int main() {
  scanf("%I64d", &x);
  for (int i = 1; i <= MX; i++) {
    P[i] = P[i - 1] + (1ll * i) * (1ll * i);
  }
  for (int i = 2; i <= MX; i++) {
    r = Solve(1ll * i);
    if (r < i) continue;
    if (r == -1) continue;
    A[i] = r;
    if (i != r) c++;
    c++;
  }
  A[1] = x;
  if (x != 1) c++;
  c++;
  printf("%I64d\n", c);
  for (int i = 1; i <= MX; i++)
    if (A[i] != 0) printf("%d %I64d\n", i, A[i]);
  for (int i = MX; i >= 1; i--)
    if (A[i] != 0 && A[i] != i) printf("%I64d %d\n", A[i], i);
  return (0);
}
