#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const int inf = 100000000;
set<pair<long long, long long> > myset;
int main() {
  long long x;
  scanf("%I64d", &x);
  long long upto = 3000000;
  long long i;
  for (i = 1; i <= upto; i++) {
    long long upper = 6 * x - i;
    upper = upper + i * i * i;
    long long lower = 3 * i * i + 3 * i;
    if ((upper % lower) == 0) {
      long long ans = upper / lower;
      if (ans < i) continue;
      if (ans != i) {
        myset.insert(pair<long long, long long>(i, ans));
        myset.insert(pair<long long, long long>(ans, i));
      } else
        myset.insert(pair<long long, long long>(i, ans));
    }
  }
  set<pair<long long, long long> >::iterator it;
  long long sz = myset.size();
  printf("%I64d\n", sz);
  for (it = myset.begin(); it != myset.end(); it++) {
    printf("%I64d %I64d\n", it->first, it->second);
  }
  return 0;
}
