#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  long long n, i, j, k, t;
  cin >> n;
  vector<pair<long long, long long> > v;
  i = 0, j = 1;
  while (i < j) {
    i++;
    j = (n - (i - 1) * i * (2 * i - 1) / 6 + i * i * (i - 1) / 2) /
        (i * i - i * (i - 1) / 2);
    if ((i * i * j - (i + j) * i * (i - 1) / 2 +
         (i - 1) * i * (2 * i - 1) / 6) != n)
      continue;
    if (i <= j) v.push_back(make_pair(i, j));
  }
  for (i = v.size() - 1; i >= 0; i--) {
    if (v[i].first != v[i].second)
      v.push_back(make_pair(v[i].second, v[i].first));
  }
  cout << v.size() << endl;
  for (i = 0; i < v.size(); i++)
    cout << v[i].first << " " << v[i].second << endl;
  return 0;
}
