#include <bits/stdc++.h>
using namespace std;
long long X;
vector<pair<long long, long long> > ans;
int main() {
  ios::sync_with_stdio(0);
  cin >> X;
  X *= 6;
  for (long long N = 1; N * (N + 1) * (2 * N + 1) <= X; N++)
    if (X % (N * (N + 1)) == 0) {
      long long res = X / (N * (N + 1));
      if ((res + N - 1) % 3 == 0) {
        long long M = (res + N - 1) / 3;
        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() << "\n";
  for (int i = 0; i < ans.size(); i++)
    cout << ans[i].first << " " << ans[i].second << "\n";
  return 0;
}
