#include <bits/stdc++.h>
using namespace std;
map<long long int, long long int> Z;
int main() {
  long long int x;
  scanf("%lld", &x);
  int k = 0;
  for (int i = 1; i <= (2 * pow(x, ((double)1) / 3)); i++) {
    long long int temp = 6 * x;
    if (temp % i == 0) {
      temp = temp / i;
      if (temp % (i + 1) == 0) {
        temp = temp / (i + 1);
        if ((temp + i - 1) % 3 == 0) {
          temp = (temp + i - 1) / 3;
          if (i <= temp) {
            k++;
            if (i != temp) k++;
            Z.insert(make_pair(i, temp));
            Z.insert(make_pair(temp, i));
          }
        }
      }
    }
  }
  printf("%d\n", k);
  for (typeof((Z).begin()) it = Z.begin(); it != (Z).end(); ++it) {
    cout << it->first << " " << it->second << endl;
  }
  return 0;
}
