#include <bits/stdc++.h>
std::vector<std::pair<long long, long long>> answer;
std::set<std::pair<long long, long long>> tmp;
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
  std::cout.tie(NULL);
  long long x;
  std::cin >> x;
  long long X = (long long)x * (long long)6;
  for (long long n = (long long)1; n <= (long long)3e6 + 7; ++n) {
    if (X % n) continue;
    if (X % (n + (long long)1)) continue;
    long long m = n + (X / (n * (n + (long long)1))) - (long long)1;
    if (m % (long long)3) continue;
    if (m / 3 < n) continue;
    tmp.insert({n, m / 3});
    tmp.insert({m / 3, n});
  }
  for (auto it : tmp) answer.push_back(it);
  std::cout << answer.size() << "\n";
  std::sort(answer.begin(), answer.end());
  for (auto it : answer) std::cout << it.first << " " << it.second << "\n";
  return 0;
}
