#include <bits/stdc++.h>
using namespace std;
int finv[300001], b[300001], ar[300001];
int main() {
  std::ios_base::sync_with_stdio(false);
  long long n = 1, m = 1, t;
  cin >> t;
  set<pair<long long, long long>> ans;
  while (n <= m) {
    long long num = t + n * n * (n - 1) / 2 - n * (n - 1) * (2 * n - 1) / 6,
              den = n * n - n * (n - 1) / 2, v;
    m = num / den;
    if (m >= n) {
      v = n * m * n - n * (n - 1) * (n + m) / 2 + n * (n - 1) * (2 * n - 1) / 6;
      if (v == t) {
        ans.insert(make_pair(n, m));
        ans.insert(make_pair(m, n));
      }
    }
    n++;
  }
  cout << ans.size() << endl;
  for (auto i : ans) cout << i.first << " " << i.second << endl;
  return 0;
}
