#include <bits/stdc++.h>
using namespace std;
long long x, res, n, i, m;
vector<pair<long long, long long> > g;
int main() {
  scanf("%I64d", &x);
  if (x == 1) {
    printf("1\n");
    printf("1 1\n");
    return 0;
  }
  n = 1;
  i = 1;
  m = x / n;
  while (m > i) {
    m = x / n;
    if (!(x % n)) g.push_back(make_pair(i, m));
    i++;
    x += n;
    n += i;
  }
  printf("%d\n", g.size() * 2 -
                     ((g[g.size() - 1].first - g[g.size() - 1].second) == 0));
  for (int i = 0; i < g.size(); i++) {
    printf("%I64d %I64d\n", g[i].first, g[i].second);
  }
  for (int i = g.size() - 1 -
               ((g[g.size() - 1].first - g[g.size() - 1].second) == 0);
       i >= 0; i--) {
    printf("%I64d %I64d\n", g[i].second, g[i].first);
  }
}
