#include <bits/stdc++.h>
using namespace std;
long long x;
bool check(long long a) { return (a * a * a) <= (x * 3); }
vector<pair<long long, long long> > ans;
int main() {
  cin >> x;
  long long L = 1, R = 2000000;
  while (L < R) {
    long long mid = (L + R) / 2 + 1;
    if (check(mid))
      L = mid;
    else
      R = mid - 1;
  }
  long long n;
  for (long long m = 1; m <= L; m++) {
    if ((x * 6) % (m * (m + 1)) == 0) {
      n = (x * 6) / m / (m + 1);
      if ((n + m - 1) % 3 == 0) {
        n = (n + m - 1) / 3;
        ans.push_back(make_pair(m, n));
      }
    }
  }
  int cnt = 0;
  while (cnt < ans.size() && ans[cnt].first <= ans[cnt].second) cnt++;
  int tot;
  bool eq = ans[cnt - 1].first == ans[cnt - 1].second;
  if (eq)
    tot = cnt * 2 - 1;
  else
    tot = cnt * 2;
  printf("%d\n", tot);
  for (int i = 0; i < cnt; i++)
    printf("%lld %lld\n", ans[i].first, ans[i].second);
  int i = cnt - 1;
  if (eq) i--;
  for (; i >= 0; i--) printf("%lld %lld\n", ans[i].second, ans[i].first);
  return 0;
}
