#include <bits/stdc++.h>
using namespace std;
const int maxn = 101010;
unsigned long long x, n, p, q;
set<pair<unsigned long long, unsigned long long> > st;
vector<pair<unsigned long long, unsigned long long> > vec;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> x;
  for (int i = 1; i <= 20 * maxn; ++i) {
    n = i;
    p = 6 * x + n * n * n - n;
    q = 3 * (n + n * n);
    if (p % q == 0 && (p / q) >= i) st.insert({i, p / q});
  }
  for (auto itr : st) {
    vec.push_back(itr);
    if (itr.first != itr.second) vec.push_back({itr.second, itr.first});
  }
  sort(vec.begin(), vec.end());
  cout << vec.size() << endl;
  for (int i = 0; i < vec.size(); ++i)
    cout << vec[i].first << " " << vec[i].second << endl;
  return 0;
}
