#include <bits/stdc++.h>
using namespace std;
long long X;
long long Ans[8000010][2] = {{0}};
int Ansp = 0;
int main() {
  cin >> X;
  X *= 6;
  for (long long i = 1;; i++) {
    if (i * i * i > X) break;
    long long div = i * (i + 1);
    if (X % div == 0) {
      long long MM = X / div;
      long long M3 = MM + i - 1;
      if (M3 % 3 != 0) continue;
      if (M3 / 3 < i) break;
      Ansp++;
      Ans[Ansp][0] = i, Ans[Ansp][1] = M3 / 3;
    }
  }
  for (int i = Ansp; i >= 1; i--) {
    if (Ans[i][0] != Ans[i][1]) {
      Ansp++;
      Ans[Ansp][0] = Ans[i][1];
      Ans[Ansp][1] = Ans[i][0];
    }
  }
  cout << Ansp << endl;
  for (int i = 1; i <= Ansp; i++) printf("%I64d %I64d\n", Ans[i][0], Ans[i][1]);
  return 0;
}
