#include <bits/stdc++.h>
using namespace std;
vector<pair<unsigned long long, unsigned long long> > ans;
int main() {
  unsigned long long x;
  scanf("%I64d", &x);
  x = 6 * x;
  unsigned long long lim = (unsigned long long)cbrt(x / 2.0);
  unsigned long long special = -1;
  for (unsigned long long i = 1; i <= lim; i++)
    if (x % i == 0) {
      unsigned long long temp = x / i;
      temp += i * i - 1;
      if (temp % (3 * i + 3) == 0) {
        temp /= (3 * i + 3);
        if (i == temp) {
          special = i;
        } else if (i < temp)
          ans.push_back(pair<unsigned long long, unsigned long long>(i, temp));
      }
    }
  int nr = 2 * ans.size();
  if (special != -1) nr++;
  printf("%d\n", nr);
  for (int i = 0; i < ans.size(); i++)
    printf("%I64d %I64d\n", ans[i].first, ans[i].second);
  if (special != -1) printf("%I64d %I64d\n", special, special);
  for (int i = ans.size() - 1; i >= 0; i--)
    printf("%I64d %I64d\n", ans[i].second, ans[i].first);
  return 0;
}
