#include <bits/stdc++.h>
using namespace std;
const int DIV = 1000000007;
const double EPS = 0.000001;
long double func1(long double t, long double r, long double v, long double l) {
  return v * t - l - r * sin(v * t / (r * 2)) * 2;
}
long double func2(long double t, long double r, long double v, long double l) {
  return v * t - l + r * sin(v * t / (r * 2)) * 2;
}
int main(int argc, char* argv[]) {
  FILE* f = stdin;
  long long x;
  fscanf(f, "%I64d", &x);
  long long max = 0;
  while (max * max * max < x * 3) max++;
  int k = 0;
  vector<pair<long long, long long>> tab;
  bool kv = false;
  for (long long m = 1; m < max; m++) {
    if ((x * 6) % (m * (m + 1)) == 0) {
      long long tmp = (x * 6) / (m * (m + 1)) + m - 1;
      long long n = tmp / 3;
      if (n * 3 == tmp && m <= n) {
        tab.push_back(make_pair(m, n));
        if (m == n) kv = true;
      }
    }
  }
  printf("%d\n", (int)(2 * tab.size()) - kv);
  for (int i = 0; i < tab.size(); i++) {
    printf("%I64d %I64d\n", tab[i].first, tab[i].second);
  }
  for (int i = tab.size() - 1; i >= 0; i--) {
    if (tab[i].first != tab[i].second) {
      printf("%I64d %I64d\n", tab[i].second, tab[i].first);
    }
  }
  return 0;
}
