#include <bits/stdc++.h>
using namespace std;
long long x;
long long ans[10000][2], tot;
int main() {
  cin >> x;
  for (int i = 1; i <= x; i++) {
    long long t = x + (long long)(i - 1) * i / 2 * i -
                  (long long)(i - 1) * (i) * (2 * i - 1) / 6;
    long long tt = (long long)i * i - (long long)(i - 1) * i / 2;
    long long fuck = t / tt;
    if (fuck < i) break;
    if (fuck * tt == t) {
      tot++;
      ans[tot][0] = i;
      ans[tot][1] = fuck;
    }
  }
  int anss = tot * 2;
  if (ans[tot][0] == ans[tot][1]) anss--;
  cout << anss << endl;
  for (int i = 1; i <= tot; i++) printf("%I64d %I64d\n", ans[i][0], ans[i][1]);
  if (ans[tot][0] == ans[tot][1]) tot--;
  for (int i = tot; i >= 1; i--) printf("%I64d %I64d\n", ans[i][1], ans[i][0]);
}
