#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  ll x;
  cin >> x;
  auto find_sol = [&](ll n) -> ll {
    ll a1 = n * n;
    ll c1 = n * n * (n - 1);
    c1 /= 2;
    ll a2 = n * (n - 1);
    a2 /= 2;
    ll c2 = (n - 1) * n * (2 * n - 1);
    c2 /= 6;
    if (a1 <= a2) return -1;
    ll m = (x - c2 + c1) / (a1 - a2);
    return m;
  };
  vector<pair<ll, ll>> vp;
  for (ll i = 1; i <= 1e7; i++) {
    ll m = find_sol(i);
    if (m < i) continue;
    ll n = i;
    if (n * n * m - (n + m) * (n * (n - 1)) / 2 +
            ((n - 1) * n * (2 * n - 1)) / 6 !=
        x)
      continue;
    vp.push_back(make_pair(i, m));
    if (m != i) vp.push_back(make_pair(m, i));
  }
  sort(vp.begin(), vp.end());
  cout << vp.size() << "\n";
  for (auto p : vp) {
    cout << p.first << " " << p.second << "\n";
  }
  return 0;
}
