#include <bits/stdc++.h>
using namespace std;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m, i, j, k, t, cnt = 0;
  vector<pair<long long, long long> > answer;
  cin >> k;
  for (t = 1; t < 10000001; t++) {
    m = t;
    j = 6ll * k + m * (m * m - 1);
    n = j / (3ll * m * (m + 1));
    if (n < m) continue;
    if (k == (m * (m + 1) * (3 * n - m + 1)) / 6) answer.push_back({m, n});
  }
  cnt = 2 * answer.size();
  for (auto x : answer)
    if (x.first == x.second) cnt--;
  cout << cnt << endl;
  for (auto x : answer) cout << x.first << " " << x.second << endl;
  reverse(answer.begin(), answer.end());
  for (auto x : answer) {
    if (x.first != x.second) cout << x.second << " " << x.first << endl;
  }
  return (0);
}
