#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x, m, n;
  cin >> x;
  x *= 6ll;
  long long equ = 0;
  vector<pair<long long, long long> > v;
  for (m = 1; m * (m + 1) <= x / (2 * m + 1); m++) {
    if (x % (m * (m + 1)) == 0 && (x / m / (m + 1) - 1 + m) % 3 == 0) {
      n = (x / m / (m + 1) + m - 1) / 3;
      if (n == m)
        equ = n;
      else if (n > m) {
        v.push_back({m, n});
      }
    }
  }
  long long cnt = 2ll * v.size() + (equ != 0);
  cout << cnt << endl;
  for (int i = 0; i < v.size(); i++)
    cout << v[i].first << ' ' << v[i].second << endl;
  if (equ != 0) cout << equ << ' ' << equ << endl;
  for (int i = v.size() - 1; i >= 0; i--)
    cout << v[i].second << ' ' << v[i].first << endl;
  return 0;
}
