#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 10;
vector<pair<long long, long long> > ans;
int main() {
  long long x;
  cin >> x;
  x *= 6;
  for (long long b = 1; b * b * b <= x; ++b) {
    if (x % b == 0 && x % (b + 1) == 0) {
      long long k = x / b / (b + 1) - (2 * b + 1);
      if (k < 0) break;
      if (k % 3 == 0) ans.push_back(make_pair(b, b + k / 3));
    }
  }
  int n = ans.size();
  for (int i = n - 1; i >= 0; --i)
    if (ans[i].first < ans[i].second)
      ans.push_back(make_pair(ans[i].second, ans[i].first));
  printf("%d\n", (int)ans.size());
  for (auto pair : ans) printf("%I64d %I64d\n", pair.first, pair.second);
  return 0;
}
