#include <bits/stdc++.h>
const double PI = 2 * asin(1);
using namespace std;
long long n[2000000], m[2000000];
long long cal(long long x, long long n) {
  if ((6 * x) % (n * (n + 1)) == 0) return (6 * x / n / (n + 1) - 1 + n) / 3;
  return -1;
}
int main() {
  int index = 0;
  long long x;
  cin >> x;
  for (long long i = 1;; i++) {
    long long m1;
    if (i * (i + 1) * (2 * i + 1) / 6 > x) break;
    if ((m1 = cal(x, i)) != -1) {
      if (i > m1) break;
      if ((3 * m1 - i + 1) * i * (i + 1) / 6 == x) {
        n[index] = i;
        m[index] = m1;
        index++;
      }
    }
  }
  if (m[index - 1] == n[index - 1])
    cout << 2 * index - 1 << endl;
  else
    cout << 2 * index << endl;
  for (int i = 0; i < index; i++) printf("%lld %lld\n", n[i], m[i]);
  if (m[index - 1] == n[index - 1]) index--;
  for (int i = index - 1; i >= 0; i--) printf("%lld %lld\n", m[i], n[i]);
}
