#include <bits/stdc++.h>
using namespace std;
const int mx = 2e6 + 6;
vector<pair<long long, long long> > ans;
int main() {
  long long x;
  scanf("%lld", &x);
  for (long long n = 1; n < mx; n++) {
    if ((6 * x) % n) continue;
    long long y = (6 * x) / n - (n - 1) * (2 * n - 1);
    if (y % 3) continue;
    long long z = y / 3 + n * n - n;
    if (z % (n + 1)) continue;
    long long m = z / (n + 1);
    if (m < n) break;
    ans.push_back(make_pair(m, n));
    if (m != n) ans.push_back(make_pair(n, m));
  }
  sort(ans.begin(), ans.end());
  printf("%d\n", ans.size());
  for (auto it = ans.begin(); it != ans.end(); it++) {
    printf("%lld %lld\n", it->first, it->second);
  }
  return 0;
}
