#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, t, x, i, flag = 0, count, z = 0;
  cin >> n;
  pair<long long int, long long int> p[100000];
  count = pow(n, 1.0 / 3);
  if (pow(count, 3) != n) count++;
  for (i = 1; i <= 2000000; i++) {
    t = i * (i - 1) * (i + 1) / 6;
    t = n + t;
    x = i * (i + 1) / 2;
    if (t % x == 0 && t / x >= i) {
      if (i == t / x) flag++;
      p[++z] = {i, t / x};
    }
  }
  if (n > 2)
    cout << 2 * z - flag << endl;
  else
    cout << n << endl;
  for (int j = 1; j <= z; j++) {
    cout << p[j].first << " " << p[j].second << endl;
  }
  if (n > 1) {
    for (int j = z; j > 0; j--) {
      if (p[j].first != p[j].second)
        cout << p[j].second << " " << p[j].first << endl;
    }
  }
}
