#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
pair<long long, long long> ps[300010];
long long x;
int main() {
  cin >> x;
  if (x == 1) {
    puts("1\n1 1");
    return 0;
  }
  ps[0].first = 1, ps[0].second = x;
  bool f1 = 0;
  long long c = 2, f2 = 0;
  int t = 1;
  while (1) {
    long long re = x - 1ll * c * (c - 1) * (2 * c - 1) / 6;
    long long p = 1ll * c * (c - 1) / 2;
    re += 1ll * c * p;
    long long m1 = re % (1ll * c * c - p);
    long long m = re / (1ll * c * c - p);
    if (c > m) break;
    if (!m1) {
      if (c == m)
        f2 = c;
      else
        ps[t++] = make_pair(c, m);
    }
    c++;
  }
  if (f2)
    cout << (2 * t + 1) << endl;
  else
    cout << (2 * t) << endl;
  for (int i = 0; i < t; i++) {
    cout << ps[i].first << " " << ps[i].second << endl;
  }
  if (f2) cout << f2 << " " << f2 << endl;
  for (int i = t - 1; i >= 0; i--) {
    cout << ps[i].second << " " << ps[i].first << endl;
  }
  return 0;
}
