#include <bits/stdc++.h>
using namespace std;
vector<unsigned long long> ans;
int main() {
  unsigned long long x;
  scanf("%llu", &x);
  unsigned long long m = x, flag = 0;
  for (unsigned long long n = 1; n <= 1e7; n++) {
    if ((6 * x + n * n * n - n) % (3 * n * n + 3 * n) == 0)
      m = (6 * x + n * n * n - n) / (3 * n * n + 3 * n);
    else if (m < n)
      break;
    else
      continue;
    if (m < n) break;
    ans.push_back(n), ans.push_back(m);
    if (n == m) {
      flag = 1;
      break;
    }
  }
  printf("%d\n", ans.size() - flag);
  for (int i = 0; i < ans.size(); i += 2)
    printf("%llu %llu\n", ans[i], ans[i + 1]);
  for (int i = ans.size() - 1; i >= 0; i -= 2)
    if (ans[i] != ans[i - 1]) printf("%llu %llu\n", ans[i], ans[i - 1]);
}
