#include <bits/stdc++.h>
using namespace std;
struct sb {
  long long x;
  long long y;
  bool operator<(const sb &wakaka) const { return x < wakaka.x; }
} test;
set<sb> node;
int main() {
  long long x;
  cin >> x;
  long long len = 2 * pow((double)x, (double)1 / (double)3);
  long long cnt = 0;
  long long n = 0;
  while (1) {
    n++;
    if (n > len) break;
    long long en = x * 6;
    long long i2 = (n - 1) * n * (2 * n - 1);
    en = en - i2;
    long long he = (n - 1) * n * 3;
    en = en + he * n;
    long long la = 6 * n * n - he;
    if (en % la == 0) {
      long long ans = en / la;
      test.x = n;
      test.y = ans;
      if (ans < n) break;
      node.insert(test);
      test.y = n;
      test.x = ans;
      node.insert(test);
      cnt = cnt + 2;
    }
  }
  cout << node.size() << endl;
  for (set<sb>::iterator it = node.begin(); it != node.end(); it++) {
    test = *it;
    cout << test.x << " " << test.y << endl;
  }
  return 0;
}
