#include <bits/stdc++.h>
using namespace std;
long long get(long long n, long long m) {
  long long ans = 0;
  for (long long k = 0; k < min(n, m); k++) ans += (n - k) * (m - k);
  return ans;
}
long long get2(long long n, long long m) {
  if (n > m) {
    long long t = n;
    n = m;
    m = t;
  }
  return m * (n * n + n) / 2 - n * n * (n + 1) / 2 +
         n * (n + 1) * (2 * n + 1) / 6;
}
long long get3(long long n, long long x) {
  long long left = x + n * n * (n + 1) / 2 - n * (n + 1) * (2 * n + 1) / 6;
  left *= 2;
  left /= n * n + n;
  if (left >= n && get2(n, left) == x)
    return left;
  else
    return -1;
}
int main() {
  ios::sync_with_stdio(false);
  long long x;
  cin >> x;
  vector<pair<long long, long long> > ans;
  for (long long n = 1; n <= 1500000; n++) {
    long long m = get3(n, x);
    if (m != -1) {
      ans.push_back(make_pair(n, m));
      if (n != m) ans.push_back(make_pair(m, n));
    }
  }
  sort(ans.begin(), ans.end());
  int s = ans.size();
  cout << s << endl;
  for (int i = 0; i < s; i++)
    cout << ans[i].first << " " << ans[i].second << endl;
  return 0;
}
