#include <bits/stdc++.h>
long long int x[1000000], y[1000000];
int main() {
  long long int n, i = 1, a = 0, b = 0;
  int ans = 0;
  scanf("%I64d", &n);
  while (true) {
    b += a;
    a += i;
    if ((n + b) / a < i) break;
    if ((n + b) % a == 0) {
      x[ans] = i;
      y[ans] = (n + b) / a;
      ans++;
    }
    i++;
  }
  if (x[ans - 1] != y[ans - 1])
    printf("%d\n", 2 * ans);
  else
    printf("%d\n", 2 * ans - 1);
  for (int j = 0; j < ans; j++) printf("%I64d %I64d\n", x[j], y[j]);
  if (x[ans - 1] != y[ans - 1]) printf("%I64d %I64d\n", y[ans - 1], x[ans - 1]);
  for (int j = ans - 2; j >= 0; j--) printf("%I64d %I64d\n", y[j], x[j]);
}
