#include <bits/stdc++.h>
using namespace std;
long long solveform(long long i) {
  long long l = 0, u = 3e9;
  long long pl, pu;
  while (u != l) {
    long long mid = (l + u) / 2;
    pl = l;
    pu = u;
    if (mid * (mid + 1) > i)
      l = mid;
    else
      u = mid;
    if (pl == l && pu == u) return -1;
  }
  if (l * (l + 1) == i) return l;
  return -1;
}
int main() {
  long long x, y, a, b, c, d;
  cin >> x;
  y = 6 * x;
  set<pair<long long, long long> > ans;
  long long n, k;
  for (long long m = 1; m < 5000000; m++) {
    if (y % (m * (m + 1)) == 0) {
      k = y / (m * (m + 1));
      if ((m + k - 1) % 3) continue;
      n = (m + k - 1) / 3;
      if (n > 0 && m <= n) {
        ans.insert(pair<long long, long long>(n, m));
        ans.insert(pair<long long, long long>(m, n));
      }
    }
  }
  for (long long g = 1; g < 5000000; g++) {
    if (y % g) continue;
    long long m;
    m = solveform(y / g);
    if (m == -1) continue;
    k = y / (m * (m + 1));
    if ((m + k - 1) % 3) continue;
    n = (m + k - 1) / 3;
    if (n > 0 && m <= n) {
      ans.insert(pair<long long, long long>(n, m));
      ans.insert(pair<long long, long long>(m, n));
    }
  }
  cout << ans.size() << endl;
  for (auto it = ans.begin(); it != ans.end(); it++) {
    cout << it->first << ' ' << it->second << endl;
  }
  return 0;
}
