#include <bits/stdc++.h>
using namespace std;
struct per {
  long long n, m;
};
long long x, K;
per ans[1200100];
int main() {
  cin >> x;
  long long n = 1, s = 1, aux, m, val;
  while (s <= x) {
    aux = x - s;
    val = n * (n + 1) / 2;
    if (aux % val == 0) {
      m = aux / val;
      K++;
      ans[K].n = n;
      ans[K].m = n + m;
    }
    n++;
    s += n * n;
    if (s < 0) break;
  }
  aux = K;
  long long i;
  for (i = aux; i >= 1; i--) {
    if (ans[i].n != ans[i].m) {
      K++;
      ans[K].n = ans[i].m;
      ans[K].m = ans[i].n;
    }
  }
  cout << K << "\n";
  for (i = 1; i <= K; i++) cout << ans[i].n << " " << ans[i].m << "\n";
  return 0;
}
