#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  long long x;
  cin >> x;
  vector<pair<long long, long long> > v;
  long long s = 0, t = 0;
  for (long long i = 1; i <= x; ++i) {
    s += i;
    if (x + t < s) break;
    if ((x + t) % s == 0) {
      if ((x + t) / s < i) break;
      v.push_back(make_pair(i, (x + t) / s));
    }
    t = s * i + s;
    t -= (2ll * i * i * i + 3ll * i * i + i) / 6;
  }
  int n = 2 * v.size();
  n -= (v.back().first == v.back().second);
  cout << n << "\n";
  for (int i = 0; i < (n + 1) / 2; ++i)
    cout << v[i].first << " " << v[i].second << "\n";
  if (n & 1) v.pop_back();
  reverse(v.begin(), v.end());
  n /= 2;
  for (int i = 0; i < n; ++i) cout << v[i].second << " " << v[i].first << "\n";
  return 0;
}
