#include <bits/stdc++.h>
using namespace std;
const int maximal = 2000000;
int main() {
  long long n;
  cin >> n;
  bool e = true;
  vector<long long> v1;
  vector<long long> v2;
  long long j;
  for (long long i = 1; i <= maximal; i++) {
    if ((n - (i - i * i * i) / 6) % ((i * i + i) / 2) == 0) {
      j = (6 * n + i * i * i - i) / (3 * (i * i + i));
      if (i > j) break;
      v1.push_back(i);
      v2.push_back(j);
      if (i == j) {
        e = false;
        break;
      }
    }
  }
  e ? cout << 2 * v1.size() << endl : cout << 2 * v1.size() - 1 << endl;
  for (long long i = 0; i < v1.size(); i++) {
    if (v1[i] == v2[i]) break;
    cout << v1[i] << " " << v2[i] << endl;
  }
  for (long long i = v2.size() - 1; i >= 0; i--) {
    cout << v2[i] << " " << v1[i] << endl;
  }
}
