#include <bits/stdc++.h>
using namespace std;
struct P {
  long long x;
  long long y;
} ans[1000005];
bool cmp(P k, P kk) { return k.x > kk.x; }
int main() {
  long long x;
  scanf("%I64d", &x);
  long long sum = 0;
  long long dic = 1;
  double fin = pow((double)(7 * x), (double)(1.0 / 3.0));
  for (long long n = 1;; n++) {
    long long tmp = 6 * x + n * n * n - n;
    long long tmp1 = 3 * n * n + 3 * n;
    if (tmp <= 0) break;
    if (tmp / tmp1 >= n && tmp % tmp1 == 0 && tmp / tmp1 == n) {
      sum++;
      ans[dic].x = n;
      ans[dic++].y = tmp / tmp1;
    } else if (tmp / tmp1 >= n && tmp % tmp1 == 0 && tmp / tmp1 != n) {
      sum = sum + 2;
      ans[dic].x = n;
      ans[dic++].y = tmp / tmp1;
      ans[dic].x = ans[dic - 1].y;
      ans[dic++].y = n;
    }
  }
  printf("%I64d\n", sum);
  sort(ans + 1, ans + dic, cmp);
  for (int i = 1; i < dic; i++) {
    printf("%I64d %I64d\n", ans[i].y, ans[i].x);
  }
  return 0;
}
