#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i;
  vector<pair<long long, long long> > v;
  cin >> n;
  if (n == 1) {
    cout << "1\n";
    cout << "1 1\n";
    return 0;
  }
  v.push_back(make_pair(1, n));
  long long b = 1;
  while (1) {
    long long k1 = ((b + 1) * (b + 2)) / 2;
    long long k2 = (b * (b + 1) * (b + 2)) / 6;
    if ((b + 1) > ((n + k2) / k1)) break;
    if ((n + k2) % k1 == 0) v.push_back(make_pair(b + 1, (n + k2) / k1));
    b++;
  }
  for (long long i = v.size() - 1; i >= 0; i--) {
    long long k1 = v[i].first;
    long long k2 = v[i].second;
    if (k1 != k2) v.push_back(make_pair(k2, k1));
  }
  cout << v.size() << endl;
  for (long long i = 0; i < v.size(); i++)
    cout << v[i].first << " " << v[i].second << endl;
  return 0;
}
