#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e7 + 3;
const int INF = 1e9;
const int MOD = 1e9 + 7;
pair<long long, long long> ans[MAXN];
int main() {
  long long x;
  long long a = 1;
  long long i = 1;
  cin >> x;
  int top = 0;
  while (x - a >= 0) {
    long long b = (i + 1) * i / 2;
    if ((x - a) % b == 0) {
      ans[top++] = pair<long long, long long>(i, i + ((x - a) / b));
      if (i != i + ((x - a) / b))
        ans[top++] = pair<long long, long long>(i + ((x - a) / b), i);
    }
    a = (i + 1) * (2 * i + 3) * (i + 2) / 6;
    i++;
  }
  sort(ans, ans + top);
  cout << top << '\n';
  for (int i = 0; i < top; i++) {
    cout << ans[i].first << ' ' << ans[i].second << '\n';
  }
  return 0;
}
