#include <bits/stdc++.h>
using namespace std;
unsigned long long int f(unsigned long long int n, unsigned long long int x) {
  if ((6 * x + n * n * n - n) % (3 * n * n + 3 * n)) return 0;
  return (6 * x + n * n * n - n) / (3 * n * n + 3 * n);
}
unsigned long long int fx(unsigned long long int n, unsigned long long int m) {
  return (n * (n * m * 3 - n * n + m * 3 + 1)) / 6;
}
vector<pair<unsigned long long int, unsigned long long int> > ans;
int main() {
  unsigned long long int n = 1442249;
  int i, j, k, cs;
  unsigned long long int t;
  ;
  ;
  scanf("%llu", &t);
  for (i = 1; i <= 2000000; i++) {
    unsigned long long int j = f(i, t);
    if (j < i) continue;
    ans.push_back({i, j});
  };
  t = ans.size() * 2;
  for (i = 0; i < ans.size(); i++) {
    if (ans[i].first == ans[i].second) t--;
  }
  cout << t << endl;
  for (i = 0; i < ans.size(); i++)
    cout << ans[i].first << " " << ans[i].second << endl;
  for (i = (int)ans.size() - 1; i >= 0; i--) {
    if (ans[i].first == ans[i].second) continue;
    cout << ans[i].second << " " << ans[i].first << endl;
  }
  return 0;
}
