#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x, i, m;
  set<pair<long long, long long> > ans;
  set<pair<long long, long long> >::iterator it;
  cin >> x;
  for (i = 1; i < 3000000; i++) {
    if ((6 * x + i * i * i - i) % (3 * i * i + 3 * i)) continue;
    m = (6 * x + i * i * i - i) / (3 * i * i + 3 * i);
    if (i <= m) {
      ans.insert(make_pair(i, m));
      ans.insert(make_pair(m, i));
    }
  }
  cout << ans.size() << endl;
  for (it = ans.begin(); it != ans.end(); it++)
    cout << it->first << " " << it->second << endl;
  return 0;
}
