#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  cin.sync_with_stdio(0);
  cout.tie(0);
  unsigned long long n, k = 1, r, a, b, c = 1e10;
  vector<pair<unsigned long long, unsigned long long>> v;
  cin >> n;
  n *= 6;
  r = floor(pow(n, 1.0 / 3.0));
  while (k <= min(r, c)) {
    if (n % (k * (k + 1)) == 0) {
      a = n / (k * (k + 1));
      b = a + 2 + k;
      if (k <= b / 3 - 1 && b % 3 == 0) {
        v.push_back({k, b / 3 - 1});
        c = b / 3 - 1;
      }
    }
    k++;
  }
  if (v[v.size() - 1].first == v[v.size() - 1].second)
    cout << 2 * v.size() - 1 << endl;
  else
    cout << 2 * v.size() << endl;
  for (int i = 0; i < v.size(); i++)
    cout << v[i].first << " " << v[i].second << "\n";
  if (v[v.size() - 1].first != v[v.size() - 1].second)
    cout << v[v.size() - 1].second << " " << v[v.size() - 1].first << "\n";
  for (int i = v.size() - 2; i >= 0; i--)
    cout << v[i].second << " " << v[i].first << "\n";
  return 0;
}
