#include <bits/stdc++.h>
using namespace std;
long long x;
int32_t main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  vector<pair<long long, long long> > v;
  cin >> x;
  long long si = 0, si2 = 0;
  for (long long i = 1; si2 < x; i++) {
    si2 += i * i;
    si += i;
    if (((x - si2) >= 0)) {
      if (((x - si2) % (si)) == 0) {
        v.push_back({((x - si2) / si) + i, i});
        if (i != (((x - si2) / si) + i)) {
          v.push_back({i, ((x - si2) / si) + i});
        }
      }
    }
  }
  cout << v.size() << "\n";
  sort(v.begin(), v.end());
  for (auto pr : v) {
    cout << pr.first << " " << pr.second << "\n";
  }
  return 0;
}
