#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long k;
  cin >> k;
  vector<pair<long long, long long>> ans;
  for (long long y = 1;; y++) {
    if (k < (2 * y * y * y + 3 * y * y + y) / 6) break;
    long long s = y, a = y + 1, e, f, x;
    e = (s * a - s * (s + 1) / 2);
    f = k + a * s * (s + 1) / 2 - (2 * s * s * s + 3 * s * s + s) / 6;
    if (f < 0 || f % e) continue;
    x = f / e;
    ans.push_back(make_pair(x - 1, y));
    if (x - 1 != y) {
      ans.push_back(make_pair(y, x - 1));
    }
  }
  sort(ans.begin(), ans.end());
  cout << ans.size() << endl;
  for (int i = 0; i < (int)(ans.size()); i++)
    cout << ans[i].first << ' ' << ans[i].second << endl;
  return 0;
}
