#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x;
  cin >> x;
  long long side1 = 1;
  long long s = 0;
  long long ss = 0;
  long long d = 0;
  long long c1 = 0;
  long long side2 = x;
  set<pair<long long, long long> > ans;
  for (long long side1 = 1; side1 * side1 <= x; ++side1) {
    s += c1;
    ss += s;
    c1++;
    d += c1;
    long long side2 = x + ss;
    if (side2 / d < side1) break;
    if (side2 % d == 0) {
      ans.insert(make_pair(side1, side2 / d));
      ans.insert(make_pair(side2 / d, side1));
    }
  }
  printf("%d\n", (int)ans.size());
  for (set<pair<long long, long long> >::iterator it = ans.begin();
       it != ans.end(); ++it) {
    printf("%I64d %I64d\n", it->first, it->second);
  }
  return 0;
}
