#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long x;
  cin >> x;
  if (x == 1) {
    cout << 1 << endl;
    cout << 1 << " " << 1 << endl;
    return 0;
  }
  vector<pair<long long, long long> > res;
  long long d = 2 * cbrtl(x);
  for (long long i = 1; i <= d; i++) {
    long long n = i;
    long long m = (n - n * n * n - 6 * x) / (-3 * (n * n + n));
    long long mod = (n - n * n * n - 6 * x) % (-3 * (n * n + n));
    if (n > m) break;
    if (mod != 0) continue;
    res.push_back({n, m});
  }
  int n = res.size();
  for (int i = 0; i < n; i++) {
    if (res[i].first == res[i].second) continue;
    res.push_back({res[i].second, res[i].first});
  }
  sort(res.begin(), res.end());
  cout << res.size() << endl;
  for (int i = 0; i < res.size(); i++) {
    cout << res[i].first << " " << res[i].second << endl;
  }
  return 0;
}
