#include <bits/stdc++.h>
using namespace std;
struct Ans {
  long long a, b;
} ans[2000010];
int sum = 0;
long long x;
int xx;
int main() {
  scanf("%lld", &x);
  x *= 6;
  int n = pow((double)x, (double)1 / 3) + 1;
  for (long long i = 1; i <= n; i++) {
    long long y = (long long)i * (i + 1);
    if (!(x % y)) {
      long long j = (long long)x / y;
      if (!((j + i - 1) % 3)) {
        long long k = (long long)(j + i - 1) / 3;
        if (i <= k) {
          ans[++sum].a = i;
          ans[sum].b = k;
        }
      }
    }
  }
  if (ans[sum].a != ans[sum].b)
    printf("%d\n", sum * 2);
  else
    printf("%d\n", sum * 2 - 1);
  for (int i = 1; i <= sum; i++) printf("%lld %lld\n", ans[i].a, ans[i].b);
  if (ans[sum].a != ans[sum].b) printf("%lld %lld\n", ans[sum].b, ans[sum].a);
  for (int i = sum - 1; i >= 1; i--) printf("%lld %lld\n", ans[i].b, ans[i].a);
  return 0;
}
