#include <bits/stdc++.h>
using namespace std;
long long x;
int anss;
pair<long long, long long> ans[1 << 22];
int main() {
  cin >> x;
  for (long long n = 1; n <= 1500000; n++) {
    long long m = x - (n * (n + 1) * (2 * n + 1)) / 6;
    if (m % (n * (n + 1) / 2) == 0) {
      m /= (n * (n + 1) / 2);
      m += n;
      if (m > n) {
        ans[anss++] = make_pair(n, m);
        ans[anss++] = make_pair(m, n);
      } else if (m == n) {
        ans[anss++] = make_pair(n, m);
      }
    }
  }
  sort(ans, ans + anss);
  printf("%d\n", anss);
  for (int i = 0; i < anss; i++) {
    printf("%I64d %I64d\n", ans[i].first, ans[i].second);
  }
}
