#include <bits/stdc++.h>
using namespace std;
int delta_x[] = {-1, 0, 1, 0};
int delta_y[] = {0, 1, 0, -1};
long long x;
int R;
vector<pair<long long, long long> > r;
inline long long gcd(long long a, long long b) {
  return (a ? gcd(b % a, a) : b);
}
int main() {
  scanf("%I64d", &x);
  long long T;
  long long s = 0, s2 = 0;
  for (long long i = 1; i <= 100000000; i++) {
    s2 += i * i;
    s += i;
    if (x < s2) break;
    if ((x - s2) % s) continue;
    long long M = i + (x - s2) / s;
    r.push_back(pair<long long, long long>(i, M));
    if (i != M) r.push_back(pair<long long, long long>(M, i));
  }
  sort(r.begin(), r.end());
  cout << r.size() << endl;
  int R = r.size() - 1;
  for (int i = (0); i <= (R); i++) {
    printf("%I64d %I64d\n", r[i].first, r[i].second);
  }
}
