#include <bits/stdc++.h>
using namespace std;
long long n, x, m, i;
vector<pair<long long, long long> > ans;
int main() {
  cin >> x;
  for (n = 1; (6 * x + n * (n * n - 1)) / (3 * n * (n + 1)) >= n; n++)
    if ((6 * x + n * (n * n - 1)) % (3 * n * (n + 1)) == 0) {
      m = (6 * x + n * (n * n - 1)) / (3 * n * (n + 1));
      ans.push_back(make_pair(n, m));
      if (n != m) ans.push_back(make_pair(m, n));
    }
  sort(ans.begin(), ans.end());
  cout << ans.size() << endl;
  for (i = 0; i < ans.size(); i++)
    cout << ans[i].first << ' ' << ans[i].second << endl;
  return 0;
}
