#include <bits/stdc++.h>
using namespace std;
vector<pair<unsigned long long, unsigned long long> > v;
unsigned long long N = 2e6;
unsigned long long getn(unsigned long long n, unsigned long long x) {
  unsigned long long ret = 6 * x;
  ret += (n * n * n);
  ret -= n;
  return ret;
}
unsigned long long getd(unsigned long long n) {
  unsigned long long ret = n * n;
  ret += n;
  ret *= 3;
  return ret;
}
int main() {
  unsigned long long x;
  cin >> x;
  unsigned long long ans = 0;
  for (int n = 1; n <= N; n++) {
    unsigned long long num = getn(n, x);
    unsigned long long den = getd(n);
    if (num % den) continue;
    unsigned long long m = num / den;
    if (n > m) continue;
    ans++;
    if (n != m) ans++;
    v.emplace_back(make_pair(n, m));
  }
  cout << ans << endl;
  for (auto it : v) {
    cout << it.first << " " << it.second << endl;
  }
  reverse(v.begin(), v.end());
  for (auto it : v) {
    if (it.first != it.second) cout << it.second << " " << it.first << endl;
  }
}
