#include <bits/stdc++.h>
using namespace std;
long long a[2000005], b[2000005];
long long ans1[2000005], ans2[2000005];
int main() {
  a[0] = 0;
  b[0] = 0;
  for (int i = 0; i < 2000002; i++) {
    a[i] = a[i - 1] + i;
    b[i] = b[i - 1] + (long long)i * (i - 1);
  }
  long long x;
  while (scanf("%I64d\n", &x) != EOF) {
    int cnt = 0, rp = 0;
    ;
    for (int i = 1; i < 2000002; i++) {
      if (b[i] >= x) break;
      if ((x - b[i]) % a[i] == 0) {
        ans1[cnt] = i;
        ans2[cnt] = (x - b[i]) / a[i] + i - 1;
        if (ans1[cnt] == ans2[cnt]) rp = 1;
        cnt++;
      }
    }
    printf("%d\n", cnt * 2 - rp);
    for (int i = 0; i < cnt; i++) printf("%I64d %I64d\n", ans1[i], ans2[i]);
    for (int i = cnt - 1 - rp; i >= 0; i--)
      printf("%I64d %I64d\n", ans2[i], ans1[i]);
  }
  return 0;
}
