#include <bits/stdc++.h>
using namespace std;
long long x, squ, res, cnt;
pair<long long, long long> ans[1000005];
int main() {
  scanf("%I64d", &x);
  for (long long n = 1; squ = n * (n + 1) * (2 * n + 1) / 6, squ <= x; n++) {
    long long res = n * (n + 1) / 2;
    if ((x - squ) % res == 0) ans[++cnt] = make_pair(n, n + (x - squ) / res);
  }
  bool flag = false;
  if (ans[cnt].first == ans[cnt].second) flag = true;
  printf("%I64d\n", flag ? cnt * 2 - 1 : cnt * 2);
  for (long long i = 1; i <= cnt; i++)
    printf("%I64d %I64d\n", ans[i].first, ans[i].second);
  for (long long i = cnt; i >= 1; i--) {
    if (flag && i == cnt)
      continue;
    else
      printf("%I64d %I64d\n", ans[i].second, ans[i].first);
  }
  return 0;
}
