#include <bits/stdc++.h>
using namespace std;
vector<pair<long long int, long long int> > v;
int main() {
  long long x;
  cin >> x;
  x *= 6;
  long long prev, s = 0;
  for (long long i = 1;; i++) {
    s += i * i;
    if (x / 6 < s) break;
    if ((x % (i * (i + 1))) == 0) {
      long long p = (x / (i * (i + 1)));
      p += i - 1;
      if (p % 3 == 0) {
        p /= 3;
        v.push_back({i, p});
        prev = p;
      }
    }
  }
  int r = v.size();
  for (int i = 0; i < r; i++) {
    if (v[i].first != v[i].second) v.push_back({v[i].second, v[i].first});
  }
  sort(v.begin(), v.end());
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++)
    printf("%I64d %I64d\n", v[i].first, v[i].second);
}
