#include <bits/stdc++.h>
using namespace std;
uint64_t x;
uint64_t mn = std::numeric_limits<uint64_t>::max();
set<pair<uint64_t, uint64_t> > ans;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(11);
  cout.setf(ios::fixed);
  cin >> x;
  for (uint64_t i = 1; i < mn && i < 2e6; ++i) {
    if ((i * i * i - i + 6LL * x) % (3 * i * (i + 1)) == 0) {
      uint64_t m =
          (uint64_t)((i * i * i - i + 6LL * x) / (3LL * i * (i + 1LL)));
      if (i <= m) {
        ans.insert(make_pair(i, m));
        ans.insert(make_pair(m, i));
      }
      mn = min(m, mn);
    }
  }
  cout << ans.size() << endl;
  for (pair<uint64_t, uint64_t> i : ans) {
    cout << i.first << ' ' << i.second << endl;
  }
  return 0;
}
