#include <bits/stdc++.h>
using namespace std;
long long x;
int main() {
  scanf("%lld", &x);
  vector<long long> a, b;
  for (long long m = 1;; ++m) {
    long long n = (6 * x - m + m * m * m) / (3 * m * (m + 1));
    if (m > n) break;
    if (3 * m * m * n - m * m * m + 3 * m * n + m == 6 * x)
      a.push_back(m), b.push_back(n);
  }
  printf("%d\n", 2 * a.size() - (a.back() == b.back()));
  for (int i = 0; i < a.size(); ++i) printf("%lld %lld\n", a[i], b[i]);
  for (int i = a.size() - 1 - (a.back() == b.back()); i >= 0; --i)
    printf("%lld %lld\n", b[i], a[i]);
  return 0;
}
