#include <bits/stdc++.h>
using namespace std;
long long int func1(long long int i) {
  long long int m = i;
  return i * (i + 1) * (2 * i + 1) / 6 - (m + m + 2) * i * (i + 1) / 2 +
         (m + m + 1 + m * m) * i;
}
long long int func2(long long int x, long long int i) {
  return x * (i + i * i - i * (i + 1) / 2);
}
int main() {
  long long int inp, tem, ans = 0, tem2;
  cin >> inp;
  vector<pair<long long int, long long int> > v;
  bool flag = 0;
  for (int i = 0; i < 100000000; i++) ans++;
  ans = 0;
  for (long long int i = 1; func1(i) <= inp; i++) {
    tem = inp - func1(i);
    if (!tem) {
      flag = 1;
      v.push_back(make_pair(i, i));
    } else {
      tem2 = func2(1, i);
      if (tem % tem2 == 0) v.push_back(make_pair(i, i + tem / tem2));
    }
  }
  if (!flag)
    cout << 2 * v.size();
  else
    cout << 2 * v.size() - 1;
  cout << '\n';
  for (int i = 0; i < v.size(); i++)
    cout << v[i].first << " " << v[i].second << '\n';
  int i = v.size() - 1;
  if (flag) i--;
  for (; i >= 0; i--) cout << v[i].second << " " << v[i].first << '\n';
  return 0;
}
