#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x;
  scanf("%lld", &x);
  long long b, l;
  set<pair<long long, long long> > ans;
  for (b = 1; (long long)b * b <= 3 * x / b + b - 1; b++) {
    long long y = 3 * x;
    long long z = b * (b + 1) / 2;
    if (y % z != 0) continue;
    y /= z;
    y = y - 1 + b;
    if (y > 0 && y % 3 == 0) {
      ans.insert(make_pair(b, y / 3));
      if (b != y / 3) {
        ans.insert(make_pair(y / 3, b));
      }
    }
  }
  printf("%lu\n", ans.size());
  set<pair<long long, long long> >::iterator it = ans.begin();
  ;
  while (it != ans.end()) {
    pair<long long, long long> c = *it;
    printf("%lld %lld\n", c.first, c.second);
    it++;
  }
  return 0;
}
