#include <bits/stdc++.h>
using namespace std;
inline void say(char *msg) { fprintf(stderr, "%s", msg); }
long long n, len, x[10000000], y[10000000];
int main() {
  scanf("%I64d\n", &n);
  for (long long i = 1; i * (i + 1) * (2 * i + 1) / 6 <= n; i++) {
    long long res = n - i * (i + 1) * (2 * i + 1) / 6;
    long long delta = i * (i + 1) / 2;
    if (res % delta == 0) {
      len++;
      x[len] = i;
      y[len] = i + res / delta;
    }
  }
  if (x[len] == y[len]) {
    printf("%I64d\n", 2 * len - 1);
    for (int i = 1; i <= (len); i++) printf("%I64d %I64d\n", x[i], y[i]);
    for (int i = (len - 1); i >= (1); i--) printf("%I64d %I64d\n", y[i], x[i]);
  } else {
    printf("%I64d\n", 2 * len);
    for (int i = 1; i <= (len); i++) printf("%I64d %I64d\n", x[i], y[i]);
    for (int i = (len); i >= (1); i--) printf("%I64d %I64d\n", y[i], x[i]);
  }
  return 0;
}
