#include <bits/stdc++.h>
using namespace std;
long long first;
int main() {
  scanf("%lld", &first);
  long long n = 1;
  vector<pair<long long, long long> > ans;
  while (n <= 1500000) {
    long long k = n - 1;
    long long top = first + ((k + 1LL) * k / 2LL) * n -
                    k * (k + 1LL) * (2LL * k + 1LL) / 6LL;
    long long bottom = (n * (k + 1LL) - (k + 1LL) * k / 2LL);
    if (bottom > 0 && top % bottom == 0) {
      long long m = top / bottom;
      if (m >= n) {
        ans.push_back(make_pair(n, m));
      }
    }
    n++;
  }
  set<pair<long long, long long> > rans;
  for (int(i) = (0); (i) < (int)(ans.size()); ++(i)) {
    rans.insert(make_pair(ans[i].first, ans[i].second));
    rans.insert(make_pair(ans[i].second, ans[i].first));
  }
  set<pair<long long, long long> >::iterator it = rans.begin();
  printf("%d\n", (int)rans.size());
  for (; it != rans.end(); it++) {
    printf("%lld %lld\n", it->first, it->second);
  }
  return 0;
}
