#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long X, p, q, num, den;
  vector<pair<unsigned long long, unsigned long long>> a;
  cin >> X;
  for (p = 1; p <= 6000000; p++) {
    num = 6ULL * X + p * (p * p - 1ULL);
    den = 3ULL * p * (p + 1ULL);
    q = num / den;
    if (q * den == num) {
      if (p <= q) {
        a.push_back(make_pair(p, q));
        if (p != q) a.push_back(make_pair(q, p));
      }
    }
  }
  cout << a.size() << endl;
  ;
  sort(a.begin(), a.end());
  for (long long i = 0; i < a.size(); i++) {
    cout << a[i].first << " " << a[i].second << endl;
  }
  return 0;
}
